From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1474) id 085FF395249B; Tue, 6 Sep 2022 07:20:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 085FF395249B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662448849; bh=SS7KImxOcAa7w9ZUy2c0O4PpxeCKItElqSa1skRqGk8=; h=From:To:Subject:Date:From; b=FR5lrCpjgWuZ6g7Z69yiI0pvvJyFPcAXL+QyHQ7e0hA5OeteSpFy6Ox13ru8tYshc lOqxofe4upzjTyAwZqM5M6+JzzsFWt6CbCt9xF+f+V0aMYBldMrkKotkZ+Da5S4U4y hkFUHWoebalssyL4ilzNwbaNmfpSQOCTVdKMBa3U= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jan-Benedict Glaw To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2488] No actual regclasses for bpf X-Act-Checkin: gcc X-Git-Author: Jan-Benedict Glaw X-Git-Refname: refs/heads/master X-Git-Oldrev: 3f585bdaa7f6fb02753ba7b4918f065357a6b7fd X-Git-Newrev: bc1bc808d860c013318a3f126dc69cb894cb3e11 Message-Id: <20220906072049.085FF395249B@sourceware.org> Date: Tue, 6 Sep 2022 07:20:49 +0000 (GMT) List-Id: https://gcc.gnu.org/g:bc1bc808d860c013318a3f126dc69cb894cb3e11 commit r13-2488-gbc1bc808d860c013318a3f126dc69cb894cb3e11 Author: Jan-Benedict Glaw Date: Tue Sep 6 09:18:36 2022 +0200 No actual regclasses for bpf Building for for bpf-unknown-none target, recent GCCs will issue an unused variable warning as the REGNO_REG_CLASS macro doesn't actually use its argument. Reference the argument as (void) to silence the warning. .../gcc/configure --prefix=... --enable-werror-always --enable-languages=all --disable-gcov --disable-shared --disable-threads --target=bpf-unknown-none --without-headers [...] make V=1 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 -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 regcprop.o -MT regcprop.o -MMD -MP -MF ./.deps/regcprop.TPo ../../gcc/gcc/regcprop.cc ../../gcc/gcc/regcprop.cc: In function 'bool copyprop_hardreg_forward_1(basic_block, value_data*)': ../../gcc/gcc/regcprop.cc:794:24: error: unused variable 'regno' [-Werror=unused-variable] 794 | unsigned int regno = REGNO (SET_SRC (set)); | ^~~~~ cc1plus: all warnings being treated as errors make[1]: *** [Makefile:1146: regcprop.o] Error 1 make[1]: Leaving directory '/var/lib/laminar/run/gcc-bpf-unknown-none/1/toolchain-build/gcc' make: *** [Makefile:4565: all-gcc] Error 2 gcc/ * config/bpf/bpf.h (REGNO_REG_CLASS): Reference arguments as (void). Diff: --- gcc/config/bpf/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/bpf/bpf.h b/gcc/config/bpf/bpf.h index 5b3f4a58763..57903477a4a 100644 --- a/gcc/config/bpf/bpf.h +++ b/gcc/config/bpf/bpf.h @@ -209,7 +209,7 @@ enum reg_class register REGNO. In general there is more that one such class; choose a class which is "minimal", meaning that no smaller class also contains the register. */ -#define REGNO_REG_CLASS(REGNO) GENERAL_REGS +#define REGNO_REG_CLASS(REGNO) ((void)(REGNO), GENERAL_REGS) /* A macro whose definition is the name of the class to which a valid base register must belong. A base register is one used in