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: Mark Mitchell <mark at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 30 Jun 2009 09:55:45 -0700
- Subject: Re: Should -Wjump-misses-init be in -Wall?
- References: <m38wjnjxnx.fsf@google.com>
Ian Lance Taylor 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.
> Any opinions on this? Should I take the new warning out of -Wall?
Having read through this thread, I think that putting this in -Wall is
the right thing. I'm very sensitive to the backwards-compatibility
issues, but I don't think that trying never to emit new errors with
-Wall is a sensible kind of backwards compatibility.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713