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

            Bug ID: 120998
           Summary: [16 regression] unable to bootstrap with cobol and
                    without --disable-werror
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mikpelinux at gmail dot com
  Target Milestone: ---

Since sometime between 20250615 (last good snapshot) and 20250622 (first bad
snapshot) I can no longer bootstrap gcc-16 with cobol in --enable-languages.
With today's master I get:

/mnt/scratch/objdir16b/./prev-gcc/xg++ -B/mnt/scratch/objdir16b/./prev-gcc/
-B/mnt/scratch/install16/x86_64-pc-linux-gnu/bin/ -nostdinc++
-B/mnt/scratch/objdir16b/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/mnt/scratch/objdir16b/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/mnt/scratch/objdir16b/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
 -I/mnt/scratch/objdir16b/prev-x86_64-pc-linux-gnu/libstdc++-v3/include 
-I/mnt/scratch/other/mikpe-gcc.git/libstdc++-v3/libsupc++
-L/mnt/scratch/objdir16b/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/mnt/scratch/objdir16b/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs 
-fno-PIE -c  -DIN_GCC_FRONTEND -g -O2 -fno-checking -gtoggle -DIN_GCC   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Werror  -DHAVE_CONFIG_H -fno-PIE
-I. -Icobol -I/mnt/scratch/other/mikpe-gcc.git/gcc
-I/mnt/scratch/other/mikpe-gcc.git/gcc/cobol
-I/mnt/scratch/other/mikpe-gcc.git/gcc/../include 
-I/mnt/scratch/other/mikpe-gcc.git/gcc/../libcpp/include
-I/mnt/scratch/other/mikpe-gcc.git/gcc/../libcody
-I/home/mikpe/pkgs/linux-x86_64/gmp-6.3.0/include
-I/home/mikpe/pkgs/linux-x86_64/mpfr-4.2.2/include
-I/home/mikpe/pkgs/linux-x86_64/mpc-1.3.1/include 
-I/mnt/scratch/other/mikpe-gcc.git/gcc/../libdecnumber
-I/mnt/scratch/other/mikpe-gcc.git/gcc/../libdecnumber/bid -I../libdecnumber
-I/mnt/scratch/other/mikpe-gcc.git/gcc/../libbacktrace   -o cobol/util.o -MT
cobol/util.o -MMD -MP -MF cobol/.deps/util.TPo
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
ydferror(const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:1985:41: error: function
'void ydferror(const char*, ...)' might be a candidate for 'gcc_tdiag' format
attribute [-Werror=suggest-attribute=format]
 1985 |   bool ret = global_dc->diagnostic_impl (&richloc, nullptr,
option_zero,
      |             
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1986 |                                          gmsgid, &ap, DK_ERROR);
      |                                          ~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
error_msg(const YYLTYPE&, const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2043:41: error: function
'void error_msg(const YYLTYPE&, const char*, ...)' might be a candidate for
'gcc_tdiag' format attribute [-Werror=suggest-attribute=format]
 2043 |   bool ret = global_dc->diagnostic_impl (&richloc, nullptr,
option_zero,        \
      |             
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2044 |                                          gmsgid, &ap, DK_ERROR);       
\
      |                                          ~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2050:3: note: in expansion
of macro 'ERROR_MSG_BODY'
 2050 |   ERROR_MSG_BODY
      |   ^~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
error_msg(const YDFLTYPE&, const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2043:41: error: function
'void error_msg(const YDFLTYPE&, const char*, ...)' might be a candidate for
'gcc_tdiag' format attribute [-Werror=suggest-attribute=format]
 2043 |   bool ret = global_dc->diagnostic_impl (&richloc, nullptr,
option_zero,        \
      |             
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2044 |                                          gmsgid, &ap, DK_ERROR);       
\
      |                                          ~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2057:3: note: in expansion
of macro 'ERROR_MSG_BODY'
 2057 |   ERROR_MSG_BODY
      |   ^~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
yyerror(const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2069:41: error: function
'void yyerror(const char*, ...)' might be a candidate for 'gcc_tdiag' format
attribute [-Werror=suggest-attribute=format]
 2069 |   bool ret = global_dc->diagnostic_impl (&richloc, nullptr,
option_zero,
      |             
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2070 |                                          gmsgid, &ap, DK_ERROR);
      |                                          ~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'bool
yywarn(const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2081:36: error: function
'bool yywarn(const char*, ...)' might be a candidate for 'gcc_tdiag' format
attribute [-Werror=suggest-attribute=format]
 2081 |   auto ret = emit_diagnostic_valist( DK_WARNING, token_location,
      |              ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2082 |                                      option_zero, gmsgid, &ap );
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
cbl_internal_error(const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2279:25: error: function
'void cbl_internal_error(const char*, ...)' might be a candidate for
'gcc_tdiag' format attribute [-Werror=suggest-attribute=format]
 2279 |   emit_diagnostic_valist( DK_ICE, token_location, option_zero, gmsgid,
&ap );
      |  
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
cbl_unimplementedw(const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2289:25: error: function
'void cbl_unimplementedw(const char*, ...)' might be a candidate for
'gcc_tdiag' format attribute [-Werror=suggest-attribute=format]
 2289 |   emit_diagnostic_valist( DK_SORRY, token_location, option_zero,
gmsgid, &ap );
      |  
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
cbl_unimplemented(const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2299:25: error: function
'void cbl_unimplemented(const char*, ...)' might be a candidate for 'gcc_tdiag'
format attribute [-Werror=suggest-attribute=format]
 2299 |   emit_diagnostic_valist( DK_SORRY, token_location, option_zero,
gmsgid, &ap );
      |  
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
cbl_unimplemented_at(const YYLTYPE&, const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2310:25: error: function
'void cbl_unimplemented_at(const YYLTYPE&, const char*, ...)' might be a
candidate for 'gcc_tdiag' format attribute [-Werror=suggest-attribute=format]
 2310 |   emit_diagnostic_valist( DK_SORRY, token_location, option_zero,
gmsgid, &ap );
      |  
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
cbl_err(const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2327:25: error: function
'void cbl_err(const char*, ...)' might be a candidate for 'gcc_tdiag' format
attribute [-Werror=suggest-attribute=format]
 2327 |   emit_diagnostic_valist( DK_FATAL, token_location, option_zero,
gmsgid, &ap );
      |  
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc: In function 'void
cbl_errx(const char*, ...)':
/mnt/scratch/other/mikpe-gcc.git/gcc/cobol/util.cc:2338:25: error: function
'void cbl_errx(const char*, ...)' might be a candidate for 'gcc_tdiag' format
attribute [-Werror=suggest-attribute=format]
 2338 |   emit_diagnostic_valist( DK_FATAL, token_location, option_zero,
gmsgid, &ap );
      |  
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:1212: cobol/util.o] Error 1
make[3]: Leaving directory '/mnt/scratch/objdir16b/gcc'
make[2]: *** [Makefile:5120: all-stage2-gcc] Error 2
make[2]: Leaving directory '/mnt/scratch/objdir16b'
make[1]: *** [Makefile:24950: stage2-bubble] Error 2
make[1]: Leaving directory '/mnt/scratch/objdir16b'
make: *** [Makefile:1106: all] Error 2

This is on x86_64-pc-linux-gnu (Fedora 41 Workstation).
gcc-16 (32d41517c72) configured with --enable-languages=c,c++,cobol
make bootstrap

Configuring with --disable-werror works around this, but I'm not keen on that,
so it means I'll have to do my gcc-16 bootstraps without cobol.

Reply via email to