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

From: Sam James <sam(at)gentoo(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Build failure with GCC 15 (defaults to -std=gnu23)
Date: 2024-11-17 02:54:01
Message-ID: 87o72eo9iu.fsf@gentoo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

postgres-17.1 fails to build with upcoming GCC 15 which defaults to
-std=gnu23 as follows:
```
In file included from ../../src/include/postgres_fe.h:25,
from checksum_helper.c:17:
../../src/include/c.h:456:23: error: two or more data types in declaration specifiers
456 | typedef unsigned char bool;
| ^~~~
../../src/include/c.h:456:1: warning: useless type name in empty declaration
456 | typedef unsigned char bool;
| ^~~~~~~
```

src/include/c.h does attempt to check for whether bool is already defined but
the check doesn't work.

There may be more issues afterwards but I haven't tried papering over
the above issue. It should be possible to reproduce w/
CFLAGS="... -std=gnu23" or CFLAGS="... -std=c23" on older GCC or Clang.

thanks,
sam

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Lakhin 2024-11-17 04:00:01 Re: BUG #18708: regex problem: (?:[^\d\D]){0} asserts with "lp->nouts == 0 && rp->nins == 0"
Previous Message Tom Lane 2024-11-16 20:11:11 Re: Today's Postgres Releases break login roles