Re: Enable -Wstrict-prototypes and -Wold-style-definition by default

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-03-18T13:32:30Z
Lists: pgsql-hackers
On 16.03.26 10:55, Peter Eisentraut wrote:
> On 09.03.26 17:39, Bertrand Drouvot wrote:
>> 0001: Prevent -Wstrict-prototypes and -Wold-style-definition warnings
>>
>> It fixes the remaining warnings that those new flags would generate.
> 
> I have committed this one.  I'll look at the rest next.

Also committed.




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add warning option -Wold-style-declaration

  2. configure: Apply -Werror=vla to C++ as well as C

  3. Enable warning like -Wstrict-prototypes on MSVC as well

  4. Remove compiler warning option -Wendif-labels

  5. Disable warnings in system headers in MSVC

  6. Fix -Wstrict-prototypes warning in ecpg_init_sqlca() declaration.