https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100603
Bug ID: 100603 Summary: csky: config/csky/csky.h:402:13: error: comparison of unsigned expression in '>= 0' is always true [-Werror=type-limits] 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! I've started doing CI builds for numerous targets again and stumbled over this (as of 5e0236d3b0e0d7ad98bcee36128433fa755b5558) using Debian's "gcc-snapshot": $ g++ --version g++ (Debian 20210320-1) 11.0.1 20210320 (experimental) [master revision 3279a9a5a9a:6526c452d22:5f256a70a05fcfc5a1caf56678ceb12b4f87f781] $ ./configure --target=csky-linux-gnu --enable-werror-always --enable-languages=all --prefix=/tmp/gcc-csky-linux-gnu $ 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 -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -I../.././gcc/../libcody -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/dpd -I../libdecnumber -I../.././gcc/../libbacktrace -o builtins.o -MT builtins.o -MMD -MP -MF ./.deps/builtins.TPo ../.././gcc/builtins.c [all 2021-05-13 15:48:27.392703] In file included from ./tm.h:32, [all 2021-05-13 15:48:27.392897] from ../.././gcc/backend.h:28, [all 2021-05-13 15:48:27.392981] from ../.././gcc/builtins.c:27: [all 2021-05-13 15:48:27.393053] ../.././gcc/builtins.c: In function 'int apply_args_size()': [all 2021-05-13 15:48:27.393128] ../.././gcc/config/csky/csky.h:402:13: error: comparison of unsigned expression in '>= 0' is always true [-Werror=type-limits] [all 2021-05-13 15:48:27.393204] 402 | (((REGNO) >= CSKY_FIRST_PARM_REGNUM \ [all 2021-05-13 15:48:27.393279] ../.././gcc/builtins.c:2187:13: note: in expansion of macro 'FUNCTION_ARG_REGNO_P' [all 2021-05-13 15:48:27.393350] 2187 | if (FUNCTION_ARG_REGNO_P (regno)) [all 2021-05-13 15:48:27.393420] | ^~~~~~~~~~~~~~~~~~~~ [all 2021-05-13 15:49:14.430002] cc1plus: all warnings being treated as errors [all 2021-05-13 15:49:14.463549] make[1]: *** [Makefile:1142: builtins.o] Error 1 [all 2021-05-13 15:49:14.464381] make[1]: Leaving directory '/var/lib/laminar/run/gcc-csky-linux-gnu/1/gcc/host-x86_64-pc-linux-gnu/gcc' [all 2021-05-13 15:49:14.469285] make: *** [Makefile:4432: all-gcc] Error 2