This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should -Wjump-misses-init be in -Wall?
- From: Gabriel Dos Reis <dosreis at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 20 Jun 2009 09:28:29 -0500
- Subject: Re: Should -Wjump-misses-init be in -Wall?
- References: <m38wjnjxnx.fsf@google.com>
- Reply-to: gdr at integrable-solutions dot net
On Sat, Jun 20, 2009 at 12:12 AM, Ian Lance Taylor<iant@google.com> wrote:
> I recently added the new -Wjump-misses-init warning option. ?It warns
> when a goto or switch jumps into the scope of an initialized variable
> without actually initializing the variable. ?I added the warning to
> -Wall because it seems to me to fit the criteria of -Wall: a dubious
> code practice which is easy to avoid.
>
> H.J. filed PR 40500 about this, arguing that this warning should not be
> in -Wall.
>
> Any opinions on this? ?Should I take the new warning out of -Wall?
Historically, many C programmers have resisted that idea (even when we could
argue that it really is bad style programming.) I would suggest to add it to
-Wextra as opposed to -Wall.
-- Gaby