From: Tom Tromey <tom@tromey.com>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>
Cc: "gcc\@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Adding -Wshadow=local to gcc build rules
Date: Wed, 18 Sep 2019 15:16:00 -0000 [thread overview]
Message-ID: <87y2yltz2d.fsf@tromey.com> (raw)
In-Reply-To: <AM6PR10MB256682838C777B5C8828C4BEE48E0@AM6PR10MB2566.EURPRD10.PROD.OUTLOOK.COM> (Bernd Edlinger's message of "Wed, 18 Sep 2019 13:08:50 +0000")
>>>>> "Bernd" == Bernd Edlinger <bernd.edlinger@hotmail.de> writes:
Bernd> I'm currently trying to add -Wshadow=local to the gcc build rules.
Bernd> I started with -Wshadow, but gave up that idea immediately.
Bernd> As you could expect the current code base has plenty of shadowed
Bernd> local variables. Most are trivial to resolve, some are less trivial.
Bernd> I am not finished yet, but it is clear that it will be a rather big
Bernd> patch.
Bernd> I would like to ask you if you agree that would be a desirable step,
Bernd> in improving code quality in the gcc tree.
We did this in gdb and it was worthwhile. According to my notes, it
found 3 real bugs (though one was by chance). You can see what else we
tried here: https://tromey.com/blog/?p=1035
Tom
next prev parent reply other threads:[~2019-09-18 15:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 13:08 Bernd Edlinger
2019-09-18 13:39 ` Martin Liška
2019-09-18 15:16 ` Tom Tromey [this message]
2019-09-19 10:20 ` Richard Biener
2019-09-20 18:20 ` Bernd Edlinger
2019-09-20 19:13 ` Jason Merrill
2019-09-21 9:44 ` Segher Boessenkool
2019-10-02 19:10 ` Bernd Edlinger
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=87y2yltz2d.fsf@tromey.com \
--to=tom@tromey.com \
--cc=bernd.edlinger@hotmail.de \
--cc=gcc@gcc.gnu.org \
/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).