pgsql: If a C23 compiler is detected, try asking for C17. - Mailing list pgsql-committers

From Thomas Munro
Subject pgsql: If a C23 compiler is detected, try asking for C17.
Date
Msg-id E1tG8rZ-003hV6-KR@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
If a C23 compiler is detected, try asking for C17.

Branches before 16 can't be compiled with a C23 compiler (see
deprecation warnings silenced by commit f9a56e72, and non-back-patchable
changes made in 16 by commit 1c27d16e).  Test __STDC_VERSION__, and if
it's above C17 then try appending -std=gnu17.  The test is done with the
user's CFLAGS, so an acceptable language version can also be configured
manually that way.

This is done in branches 15 and older, back to 9.2, per policy of
keeping them buildable with modern tools.

Discussion: https://postgr.es/m/87o72eo9iu.fsf%40gentoo.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/59ea17c43c6c8020cc5076979d13ee61427f89c6

Modified Files
--------------
configure    | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
configure.in | 20 ++++++++++++++++
2 files changed, 97 insertions(+)


pgsql-committers by date:

Previous
From: Thomas Munro
Date:
Subject: pgsql: If a C23 compiler is detected, try asking for C17.
Next
From: Thomas Munro
Date:
Subject: pgsql: If a C23 compiler is detected, try asking for C17.