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

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Enable -Wstrict-prototypes and -Wold-style-definition by default
Date: 2026-03-18 13:31:58
Message-ID: E1w2r09-000KvX-0b@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Those are available in all gcc and clang versions that support C11 and as C11
is required as of f5e0186f865c, then we can add them without capability test.

Having them enabled by default avoid having to chase these manually like
11171fe1fc8, cdf4b9aff2, 0e72b9d440, 7069dbcc31, f1283ed6cc, 7b66e2c086,
e95126cf04 and 9f7c527af3 have done.

Also, readline headers trigger a lot of warnings with -Wstrict-prototypes, so
we make use of the system_header pragma to hide the warnings.

Author: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Discussion: https://postgr.es/m/13d51b20-a69c-4ac1-8546-ec4fc278064f%40eisentraut.org
Discussion: https://postgr.es/m/aTFctZwWSpl2/LG5%40ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/29bf4ee7496ca594495deb2599e8a44c6338525e

Modified Files
--------------
configure | 8 ++++++++
configure.ac | 8 ++++++++
meson.build | 2 ++
src/bin/psql/input.h | 9 +++++++++
4 files changed, 27 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2026-03-18 17:00:10 pgsql: Fix pg_dump for CREATE FOREIGN DATA WRAPPER ... CONNECTION.
Previous Message Peter Eisentraut 2026-03-18 12:47:31 pgsql: Update RELEASE_CHANGES