Re: Enable -Wstrict-prototypes and -Wold-style-definition by default
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2026-04-06T21:19:51Z
Lists: pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes: > The first three patches have been committed. b4a132022 has had some not-so-desirable effects in the buildfarm: drongo and hoatzin are each spewing a couple dozen repetitive warnings about every bison-generated header file, eg src/backend/bootstrap/bootparse.h(111): warning C4255: 'boot_yyparse': no function prototype given: converting '()' to '(void)' Both of those machines are using bison 2.7, which is pretty old and evidently isn't careful about generating complete prototypes. I'm not sure if there's anything to be done about this, except perhaps nag the animals' owners to find a newer bison somewhere. We could revert b4a132022, but then we might miss valid warnings about such issues in Windows-only code. regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add warning option -Wold-style-declaration
- c73e8ee061ad 19 (unreleased) landed
-
configure: Apply -Werror=vla to C++ as well as C
- 488ab592d9ea 19 (unreleased) landed
-
Enable warning like -Wstrict-prototypes on MSVC as well
- b4a132022444 19 (unreleased) landed
-
Remove compiler warning option -Wendif-labels
- 87e1891c459e 19 (unreleased) landed
-
Disable warnings in system headers in MSVC
- bccfc73acde9 19 (unreleased) landed
-
Fix -Wstrict-prototypes warning in ecpg_init_sqlca() declaration.
- f91b8ff6af91 19 (unreleased) landed