From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] bpf: Fix unused variable warning
Date: Tue, 06 Sep 2022 00:24:09 +0200 [thread overview]
Message-ID: <87mtbdtq7q.fsf@oracle.com> (raw)
In-Reply-To: <20220905104312.xq3dkytz5olm56up@lug-owl.de> (Jan-Benedict Glaw's message of "Mon, 5 Sep 2022 12:43:12 +0200")
Hi Jan.
> 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
>
>
> Ok for HEAD?
OK. Thanks.
prev parent reply other threads:[~2022-09-05 22:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 10:43 Jan-Benedict Glaw
2022-09-05 22:24 ` Jose E. Marchesi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mtbdtq7q.fsf@oracle.com \
--to=jose.marchesi@oracle.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jbglaw@lug-owl.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).