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

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Sam James <sam@gentoo.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Thomas Munro <thomas.munro@gmail.com>, tharakan@gmail.com, Peter Eisentraut <peter@eisentraut.org>, pgsql-bugs@lists.postgresql.org
Date: 2024-11-27T19:21:11Z
Lists: pgsql-bugs
Hi,

On 2024-11-27 19:01:36 +0000, Sam James wrote:
> > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113688
> See https://gcc.gnu.org/PR117724 as well. The issues are related in that
> canonicalisation of struct types keeps needing revisiting, more so in
> light of C23 changes.

Thanks.


> Note also that the ICE is only with "checking" (~assertions) which is
> enabled at a stricter level for non-releases by default, so some of it
> may affect 14 but not show up there.

Ah, that explains that.


> Martin Uecker has posted a patch which is currently being reviewed. I
> wouldn't worry about it until that lands unless the build failures continue.

I changed my local build to use the same --checking as debian's gcc-snapshot,
confirmed that that reproduces the issue. Then applied Martin's patch. It does
fix the problem.

Greetings,

Andres Freund



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.