Re: Should we remove -Wdeclaration-after-statement?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Should we remove -Wdeclaration-after-statement?
Дата
Msg-id 2494006.1703689528@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Should we remove -Wdeclaration-after-statement?  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Ответы Re: Should we remove -Wdeclaration-after-statement?  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Список pgsql-hackers
Jelte Fennema-Nio <postgres@jeltef.nl> writes:
> Postgres currently requires all variables to be declared at the top of
> the function, because it specifies -Wdeclaration-after-statement. One
> of the reasons that we had this warning was because C89 required this
> style of declaration. Requiring it everywhere made backporting easier,
> since some of our older supported PG versions needed to compile on
> C89. Now that we have dropped support for PG11 that reason goes away,
> since now all supported Postgres versions require C99. So, I think
> it's worth reconsidering if we want this warning to be enabled or not.

This has already been debated, and the conclusion was that we would
stick to the existing style for consistency reasons.  The fact that
back-portable patches required it was only one of the arguments, and
not the decisive one.

            regards, tom lane



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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: cannot abort transaction 2737414167, it was already committed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_upgrade failing for 200+ million Large Objects