[Bug 293341] sysutils/grub2-pcbsd: Fails to build with GCC 15: error: cannot use keyword 'false' as enumeration constant

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 21 Feb 2026 16:00:05 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293341

            Bug ID: 293341
           Summary: sysutils/grub2-pcbsd: Fails to build with GCC 15:
                    error: cannot use keyword 'false' as enumeration
                    constant
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
               URL: https://pkg-status.freebsd.org/gohan05/data/143amd64-d
                    efault-foo/2026-01-30_10h01m25s/logs/errors/grub2-pcbs
                    d-2.02q_19.log
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: salvadore@freebsd.org
            Blocks: 292692

The port fails to build with GCC 15 and blocks GCC_DEFAULT update to 15. Full
log in URL field. This link might be useful:
https://gcc.gnu.org/gcc-15/porting_to.html .

gcc15 -DHAVE_CONFIG_H -I.  -Wall -W -DGRUB_UTIL=1 -D_FILE_OFFSET_BITS=64
-I./include -DGRUB_FILE=\"grub-core/fs/squash4.c\" -I. -I. -I. -I. -I./include
-I./include -I./grub-core/lib/libgcrypt-grub/src/  -I./grub-core/lib/minilzo
-I./grub-core/lib/xzembed -DMINILZO_HAVE_CONFIG_H -I/usr/local/include
-D_FILE_OFFSET_BITS=64 -Wall -W -Wshadow -Wpointer-arith -Wundef
-Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization
-Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k
-Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain
-Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses
-Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs
-Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter
-Wunused-value  -Wunused-variable -Wwrite-strings -Wnested-externs
-Wstrict-prototypes -Wcast-align  -Wextra -Wattributes -Wendif-labels
-Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers
-Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing
-Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs
-Wmissing-prototypes -Wmissing-declarations -Wformat=2  -fno-builtin -Wno-undef
-O2 -pipe  -fpermissive -Wl,-rpath=/usr/local/lib/gcc15 -fno-strict-aliasing 
-MT grub-core/fs/libgrubmods_a-squash4.o -MD -MP -MF
grub-core/fs/.deps-util/libgrubmods_a-squash4.Tpo -c -o
grub-core/fs/libgrubmods_a-squash4.o `test -f 'grub-core/fs/squash4.c' || echo
'./'`grub-core/fs/squash4.c
In file included from grub-core/fs/squash4.c:31:
./grub-core/lib/xzembed/xz.h:33:16: error: cannot use keyword 'false' as
enumeration constant
   33 | typedef enum { false = 0, true = 1 } bool;
      |                ^~~~~
./grub-core/lib/xzembed/xz.h:33:16: note: 'false' is a keyword with '-std=c23'
onwards
./grub-core/lib/xzembed/xz.h:33:38: error: expected ';', identifier or '('
before 'bool'
   33 | typedef enum { false = 0, true = 1 } bool;
      |                                      ^~~~
./grub-core/lib/xzembed/xz.h:33:38: warning: useless type name in empty
declaration
gmake[2]: *** [Makefile:7273: grub-core/fs/libgrubmods_a-squash4.o] Error 1


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292692
[Bug 292692] [exp-run] Update GCC_DEFAULT to 15
-- 
You are receiving this mail because:
You are the assignee for the bug.