Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tCfgi-009oli-Vw for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2024 13:51:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tCfgg-0003C7-AM for pgsql-bugs@arkaria.postgresql.org; Sun, 17 Nov 2024 13:51:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tCVQS-00GUH5-NO for pgsql-bugs@lists.postgresql.org; Sun, 17 Nov 2024 02:54:13 +0000 Received: from woodpecker.gentoo.org ([140.211.166.183] helo=smtp.gentoo.org) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tCVQP-002ICS-Ux for pgsql-bugs@lists.postgresql.org; Sun, 17 Nov 2024 02:54:11 +0000 From: Sam James To: pgsql-bugs@lists.postgresql.org Subject: Build failure with GCC 15 (defaults to -std=gnu23) Organization: Gentoo User-Agent: mu4e 1.12.7; emacs 31.0.50 Date: Sun, 17 Nov 2024 02:54:01 +0000 Message-ID: <87o72eo9iu.fsf@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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