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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sam James <sam@gentoo.org>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2024-11-17T18:11:52Z
Lists: pgsql-bugs
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 !?

			regards, tom lane



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Require sizeof(bool) == 1.

  2. If a C23 compiler is detected, try asking for C17.

  3. Fix C23 compiler warning

  4. Rename C23 keyword

  5. Assume that <stdbool.h> conforms to the C standard.

  6. Revise tree-walk APIs to improve spec compliance & silence warnings.