Re: Build failure with GCC 15 (defaults to -std=gnu23)

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sam James <sam(at)gentoo(dot)org>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Build failure with GCC 15 (defaults to -std=gnu23)
Date: 2024-11-17 19:30:56
Message-ID: CA+hUKGJsuBiBcYnmJhGUNEg6Ud3n+C3K8c6em6RTOgu1E-dbwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Nov 18, 2024 at 7:12 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Sam James <sam(at)gentoo(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-11-17 20:26:41 Re: Build failure with GCC 15 (defaults to -std=gnu23)
Previous Message Tom Lane 2024-11-17 18:11:52 Re: Build failure with GCC 15 (defaults to -std=gnu23)