Re: Build failure with GCC 15 (defaults to -std=gnu23) - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: Build failure with GCC 15 (defaults to -std=gnu23)
Date
Msg-id b906d958-4b37-47f3-9efb-79b575042661@eisentraut.org
Whole thread Raw
In response to Re: Build failure with GCC 15 (defaults to -std=gnu23)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 20.11.24 16:32, Tom Lane wrote:
> Peter Eisentraut <peter@eisentraut.org> writes:
>> Note that if we backpatch C23 support, we also need to backpatch at
>> least commits a67a49648d9 and d2b4b4c2259.
> 
> Yeah.  Our normal theory for this kind of thing is "people are
> likely to build our old branches with modern toolchains", so
> we are going to have to back-patch C23 compatibility sooner or
> later.  In fact, we'll have to back-patch to 9.2, or else
> decide that those branches are unbuildable on modern platforms
> and hence out of scope for compatibility testing.

I have checked that with this patch and the two above (well, one is just 
to remove a warning), you can get PG16 and up building cleanly with 
gcc-14 -std=gnu23.

Before that, you get a ton of warnings and errors related to the node 
tree walker routines.  This is presumably related to commit 1c27d16e6e5.

Going further back, the bool patch proposed here assumes that stdbool.h 
exists unconditionally, which is C99, which is not the baseline for 
older branches.  I think for those it's probably best to leave it alone 
and just use gcc-15 -std=gnu89 or whatever.




pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Can not open Postgre SQL 17.1 after update
Next
From: PG Bug reporting form
Date:
Subject: BUG #18718: Incorrect Twitter/X Logo Displayed on PostgreSQL Documentation Page