From: <ltaylorsimpson@gmail.com>
To: "'Brian Cain'" <bcain@quicinc.com>, <qemu-devel@nongnu.org>
Cc: <armbru@redhat.com>, <richard.henderson@linaro.org>,
<philmd@linaro.org>, <peter.maydell@linaro.org>,
<quic_mathbern@quicinc.com>, <stefanha@redhat.com>, <ale@rev.ng>,
<anjo@rev.ng>, <quic_mliebel@quicinc.com>
Subject: RE: [PATCH v2 2/3] target/hexagon: fix some occurrences of -Wshadow=local
Date: Fri, 6 Oct 2023 08:59:29 -0600 [thread overview]
Message-ID: <312a01d9f865$b5c0d840$214288c0$@gmail.com> (raw)
In-Reply-To: <20231005222206.2784853-3-bcain@quicinc.com>
> -----Original Message-----
> From: Brian Cain <bcain@quicinc.com>
> Sent: Thursday, October 5, 2023 4:22 PM
> To: qemu-devel@nongnu.org
> Cc: bcain@quicinc.com; armbru@redhat.com; richard.henderson@linaro.org;
> philmd@linaro.org; peter.maydell@linaro.org; quic_mathbern@quicinc.com;
> stefanha@redhat.com; ale@rev.ng; anjo@rev.ng;
> quic_mliebel@quicinc.com; ltaylorsimpson@gmail.com
> Subject: [PATCH v2 2/3] target/hexagon: fix some occurrences of -
> Wshadow=local
>
> Of the changes in this commit, the changes in
> `HELPER(commit_hvx_stores)()` are less obvious. They are required because
> of some macro invocations like SCATTER_OP_WRITE_TO_MEM().
>
> e.g.:
>
> In file included from ../target/hexagon/op_helper.c:31:
> ../target/hexagon/mmvec/macros.h:205:18: error: declaration of ‘i’
> shadows a previous local [-Werror=shadow=compatible-local]
> 205 | for (int i = 0; i < sizeof(MMVector); i += sizeof(TYPE)) { \
> | ^
> ../target/hexagon/op_helper.c:157:17: note: in expansion of macro
> ‘SCATTER_OP_WRITE_TO_MEM’
> 157 | SCATTER_OP_WRITE_TO_MEM(uint16_t);
> | ^~~~~~~~~~~~~~~~~~~~~~~
> ../target/hexagon/op_helper.c:135:9: note: shadowed declaration is here
> 135 | int i;
> | ^
> In file included from ../target/hexagon/op_helper.c:31:
> ../target/hexagon/mmvec/macros.h:204:19: error: declaration of ‘ra’
> shadows a previous local [-Werror=shadow=compatible-local]
> 204 | uintptr_t ra = GETPC(); \
> | ^~
> ../target/hexagon/op_helper.c:160:17: note: in expansion of macro
> ‘SCATTER_OP_WRITE_TO_MEM’
> 160 | SCATTER_OP_WRITE_TO_MEM(uint32_t);
> | ^~~~~~~~~~~~~~~~~~~~~~~
> ../target/hexagon/op_helper.c:134:15: note: shadowed declaration is here
> 134 | uintptr_t ra = GETPC();
> | ^~
>
> Reviewed-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
> Signed-off-by: Brian Cain <bcain@quicinc.com>
> ---
> target/hexagon/imported/alu.idef | 6 +++---
> target/hexagon/mmvec/macros.h | 6 +++---
> target/hexagon/op_helper.c | 9 +++------
> target/hexagon/translate.c | 9 ++++-----
> 4 files changed, 13 insertions(+), 17 deletions(-)
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
next prev parent reply other threads:[~2023-10-06 15:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 22:22 [PATCH v2 0/3] hexagon: GETPC() and shadowing fixes Brian Cain
2023-10-05 22:22 ` [PATCH v2 1/3] target/hexagon: move GETPC() calls to top level helpers Brian Cain
2023-10-05 22:22 ` [PATCH v2 2/3] target/hexagon: fix some occurrences of -Wshadow=local Brian Cain
2023-10-06 5:49 ` Philippe Mathieu-Daudé
2023-10-06 14:59 ` ltaylorsimpson [this message]
2023-10-05 22:22 ` [PATCH v2 3/3] target/hexagon: avoid shadowing globals Brian Cain
2023-10-06 16:00 ` ltaylorsimpson
2023-10-08 13:49 ` Brian Cain
2023-10-09 18:59 ` ltaylorsimpson
2023-10-09 6:09 ` Philippe Mathieu-Daudé
2023-10-09 6:43 ` Philippe Mathieu-Daudé
2023-10-09 20:53 ` Brian Cain
2023-10-10 5:22 ` Philippe Mathieu-Daudé
2023-10-10 6:04 ` Markus Armbruster
2023-10-10 7:34 ` Philippe Mathieu-Daudé
2023-10-10 9:10 ` Thomas Huth
2023-10-18 3:11 ` Brian Cain
2023-10-10 4:57 ` Markus Armbruster
2023-10-06 9:00 ` [PATCH v2 0/3] hexagon: GETPC() and shadowing fixes Markus Armbruster
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='312a01d9f865$b5c0d840$214288c0$@gmail.com' \
--to=ltaylorsimpson@gmail.com \
--cc=ale@rev.ng \
--cc=anjo@rev.ng \
--cc=armbru@redhat.com \
--cc=bcain@quicinc.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quic_mathbern@quicinc.com \
--cc=quic_mliebel@quicinc.com \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
/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 NNTP newsgroup(s).