public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tsukasa OI <research_trasio@irq.a4lg.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 4/4] gdb: Suppress "unused" variable warning on Clang
Date: Mon, 17 Oct 2022 08:35:04 -0400	[thread overview]
Message-ID: <dc9a2360-9e6a-96ca-7658-b21e8d80a8a1@simark.ca> (raw)
In-Reply-To: <a7998c72-1dc0-cfe6-57b5-e9d0a0fe1327@irq.a4lg.com>



On 2022-10-16 09:37, Tsukasa OI via Gdb-patches wrote:
> On 2022/10/13 2:36, Simon Marchi wrote:
>> On 9/22/22 04:25, Tsukasa OI via Gdb-patches wrote:
>>> Clang generates a warning if there is a variable which is written but not
>>> read thereafter.  By the default configuration (with "-Werror"), it causes a
>>> build failure (unless "--disable-werror" is specified).
>>>
>>> Because the cause of this error is in the Bison-generated code
>>> ($(srcdir)/gdb/cp-name-parser.y -> $(builddir)/gdb/cp-name-parser.c),
>>> this commit suppresses this warning ("-Wunused-but-set-variable") by placing
>>> the DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE macro at the end of user
>>> prologue of cp-name-parser.y.
>>
>> Hi,
>>
>> I just sent a patch to fix the same thing as your patch here, but only
>> saw your patch after.  However, I took a different, more fine-grained
>> approach:
>>
>> https://inbox.sourceware.org/gdb-patches/20221012173256.20079-1-simon.marchi@efficios.com/T/#u
>>
>> Can you let me know what you think?
>>
>> Simon
>>
> 
> I always prefer fine-grained approach if we can.  The only reason I
> didn't do that on gold is because I didn't know proper place for "(void)
> yynerrs".  I cannot approve (as I'm not a maintainer) but I support your
> patchset.

Ok, thanks for the feedback, I will push my version.

Simon

  reply	other threads:[~2022-10-17 12:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  3:10 [PATCH 0/4] gdb: (includes PR28413), Suppress some general warnings if built with Clang Tsukasa OI
2022-09-15  3:10 ` [PATCH 1/4] include: Add macro to ignore -Wuser-defined-warnings Tsukasa OI
2022-09-20 16:36   ` Nick Clifton
2022-09-22 13:02     ` Enze Li
2022-09-15  3:10 ` [PATCH 2/4] include: Add macro to ignore -Wunused-but-set-variable Tsukasa OI
2022-09-15  3:10 ` [PATCH 3/4] gdb/unittests: PR28413, suppress warnings generated by Gnulib Tsukasa OI
2022-09-15  3:10 ` [PATCH 4/4] gdb: Suppress "unused" variable warning on Clang Tsukasa OI
2022-09-22  8:25 ` [PATCH v2 0/4] gdb: (includes PR28413), Suppress some general warnings if built with Clang Tsukasa OI
2022-09-22  8:25   ` [PATCH v2 1/4] include: Add macro to ignore -Wuser-defined-warnings Tsukasa OI
2022-09-22 11:26     ` Nick Clifton
2022-09-22  8:25   ` [PATCH v2 2/4] include: Add macro to ignore -Wunused-but-set-variable Tsukasa OI
2022-09-22 11:27     ` Nick Clifton
2022-09-22  8:25   ` [PATCH v2 3/4] gdb/unittests: PR28413, suppress warnings generated by Gnulib Tsukasa OI
2022-10-18 13:44     ` Enze Li
2022-10-18 16:14       ` Tsukasa OI
2022-09-22  8:25   ` [PATCH v2 4/4] gdb: Suppress "unused" variable warning on Clang Tsukasa OI
2022-10-12 17:36     ` Simon Marchi
2022-10-16 13:37       ` Tsukasa OI
2022-10-17 12:35         ` Simon Marchi [this message]
2022-10-18 17:11   ` [PATCH v3] gdb/unittests: PR28413, suppress warnings generated by Gnulib Tsukasa OI
2022-11-14 14:02     ` Simon Marchi

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=dc9a2360-9e6a-96ca-7658-b21e8d80a8a1@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=research_trasio@irq.a4lg.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 read-only IMAP folder(s) and NNTP newsgroup(s).