https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111330

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, narrowed it down to Fedora build doing essentially (stripped down from all
languages etc.):
CC=gcc \
CXX=g++ \
CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -Wall -Wformat-security
-Wp,-D_GLIBCXX_ASSERTIONS -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection' \
CXXFLAGS=' -O2 -g -grecord-gcc-switches -Wformat -Wformat-security
-Wp,-D_GLIBCXX_ASSERTIONS -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection ' \
XCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -Wall -Wformat-security
-Wp,-D_GLIBCXX_ASSERTIONS -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection' \
TCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -Wall -Wformat-security
-Wp,-D_GLIBCXX_ASSERTIONS -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection' \
../configure --disable-bootstrap --enable-languages=c,c++,m2,lto
--enable-checking=release --enable-multilib --disable-libsanitizer
--with-gcc-major-version-only --enable-plugin --enable-gnu-indirect-function
--enable-cet --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
make -j32 'BOOT_CFLAGS=-O2 -fexceptions -g -grecord-gcc-switches -Wall
-Wformat-security -Wp,-D_GLIBCXX_ASSERTIONS -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now

And what matters is using -Wall during the build in *FLAGS.
/builddir/build/BUILD/gcc-13.2.1-20230728/obj-x86_64-redhat-linux/./gcc/gm2
-B/builddir/build/BUILD/gcc-13.2.1-20230728/obj-x86_64-redhat-linux/./gcc/ -c
-O2 -Wall -fm2-pathname=m2iso -I. -Ilibm2iso
-I/builddir/build/BUILD/gcc-13.2.1-20230728/gcc/m2/gm2-libs-iso
-fm2-pathname=m2pim -I/builddir/build/BUILD/gcc-13.2.1-20230728/gcc/m2/gm2-libs
-fiso -fextended-opaque -fm2-g -g -Wreturn-type -fcase -fm2-prefix=m2iso
../../../../libgm2/libm2iso/../../gcc/m2/gm2-libs-iso/SeqFile.mod  -fPIC -DPIC
-o .libs/SeqFile.o; echo $?
../../gcc/m2/gm2-compiler/M2SymInit.def:1:case statement has no matching
selection
1
while
/builddir/build/BUILD/gcc-13.2.1-20230728/obj-x86_64-redhat-linux/./gcc/gm2
-B/builddir/build/BUILD/gcc-13.2.1-20230728/obj-x86_64-redhat-linux/./gcc/ -c
-O2 -fm2-pathname=m2iso -I. -Ilibm2iso
-I/builddir/build/BUILD/gcc-13.2.1-20230728/gcc/m2/gm2-libs-iso
-fm2-pathname=m2pim -I/builddir/build/BUILD/gcc-13.2.1-20230728/gcc/m2/gm2-libs
-fiso -fextended-opaque -fm2-g -g -Wreturn-type -fcase -fm2-prefix=m2iso
../../../../libgm2/libm2iso/../../gcc/m2/gm2-libs-iso/SeqFile.mod  -fPIC -DPIC
-o .libs/SeqFile.o; echo $?
0

Shouldn't -Wall affect just warnings (without -Werror) and not whether
compilation succeeds or fails?

Reply via email to