Re: C99 compliance for src/port/snprintf.c

Поиск
Список
Период
Сортировка
От David Steele
Тема Re: C99 compliance for src/port/snprintf.c
Дата
Msg-id 6ae46827-45de-b3e7-4f19-01f9c48b28d4@pgmasters.net
обсуждение исходный текст
Ответ на Re: C99 compliance for src/port/snprintf.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: C99 compliance for src/port/snprintf.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 8/15/18 12:17 PM, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> 
>> Personally, I'd prefer to
>> continue avoiding // comments and intermingled declarations of
>> variables and code on grounds of style and readability.
> 
> ... which I agree with.

We already have -Wdeclaration-after-statement to prevent mixed
declarations.  Not sure what to do about comments except manual enforcement.

>> But it's kind
>> of difficult to believe that we really need to worry about people
>> still running 20-year old compilers very much.
> 
> Sure.  It's been a long time since anybody worried about those as
> optimization targets, for instance.  Still, I'm not in favor of
> actively breaking compatibility unless it buys us something.

We use C99 for the pgBackRest project and we've found designated
initializers, compound declarations, and especially variadic macros to
be very helpful.  Only the latter really provides new functionality but
simplifying and clarifying code is always a bonus.

So, +1 from me!

Regards,
-- 
-David
david@pgmasters.net


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Documentaion fix.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: C99 compliance for src/port/snprintf.c