Jelte Fennema-Nio <postg...@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


Reply via email to