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

From Thomas Munro
Subject Re: Build failure with GCC 15 (defaults to -std=gnu23)
Date
Msg-id CA+hUKGJsuBiBcYnmJhGUNEg6Ud3n+C3K8c6em6RTOgu1E-dbwg@mail.gmail.com
Whole thread Raw
In response to Re: Build failure with GCC 15 (defaults to -std=gnu23)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Build failure with GCC 15 (defaults to -std=gnu23)
List pgsql-bugs
On Mon, Nov 18, 2024 at 7:12 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Sam James <sam@gentoo.org> writes:
> > postgres-17.1 fails to build with upcoming GCC 15 which defaults to
> > -std=gnu23 as follows:
>
> I do not think we claim to support C23 yet.
>
> Having said that, I can reproduce this on gcc 14 using -std=gnu23.
> It appears that configure is deciding that <stdbool.h> is not
> conformant to C99 because it doesn't declare "bool" as a macro.
> Did C23 really remove that !?

Yes, seems to be a general pattern: features introduced as keyword
_Xxx with a library macro xxx -> _Xxx (usually where xxx is already a
keyword in C++ but the C committee was afraid to unleash a new keyword
directly on the world, I guess?), and now xxx is finally graduating to
real keyword status.  Other examples: static_assert, thread_local,
alignas.



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Build failure with GCC 15 (defaults to -std=gnu23)
Next
From: Tom Lane
Date:
Subject: Re: Build failure with GCC 15 (defaults to -std=gnu23)