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

            Bug ID: 100841
           Summary: xtensa-linux: dwarf2cfi.c:291:12: error: comparison of
                    integer expressions of different signedness: 'const
                    unsigned int' and 'int'
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jbg...@lug-owl.de
  Target Milestone: ---

Hi!

After having started automated testing again, I noticed this as of
ef8176e0fac935c095cc39f4ecdfd43cdb8cb3f3, building with a quite recent GCC:

$ ../gcc/configure --target=xtensa-linux --enable-werror-always
--enable-languages=all --disable-gcov --disable-shared --disable-threads
--without-headers
--prefix=/var/lib/laminar/run/gcc-xtensa-linux/2/toolchain-install

$ make all-gcc
[...]
/usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2 -DIN_GCC 
-DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I.
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody 
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o dwarf2cfi.o -MT
dwarf2cfi.o -MMD -MP -MF ./.deps/dwarf2cfi.TPo ../../gcc/gcc/dwarf2cfi.c
../../gcc/gcc/dwarf2cfi.c: In function 'void init_one_dwarf_reg_size(int,
machine_mode, rtx, machine_mode, init_one_dwarf_reg_state*)':
../../gcc/gcc/dwarf2cfi.c:291:12: error: comparison of integer expressions of
different signedness: 'const unsigned int' and 'int' [-Werror=sign-compare]
  291 |   if (rnum >= DWARF_FRAME_REGISTERS)
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1141: dwarf2cfi.o] Error 1
make[1]: Leaving directory
'/var/lib/laminar/run/gcc-xtensa-linux/2/toolchain-build/gcc'
make: *** [Makefile:4414: all-gcc] Error 2

Should be simple to fix I guess.

Thanks,
  Jan-Benedict

Reply via email to