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: Ian Lance Taylor <iant at google dot com>
- To: Basile STARYNKEVITCH <basile at starynkevitch dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 20 Jun 2009 00:02:06 -0700
- Subject: Re: Should -Wjump-misses-init be in -Wall?
- References: <m38wjnjxnx.fsf@google.com> <4A3C8155.80201@starynkevitch.net>
Basile STARYNKEVITCH <basile@starynkevitch.net> writes:
> 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.
...
> Ian, did this warning trigger a lot of new messages while bootstrapping gcc?
It caused three new errors while bootstrapping gcc, fixed with these
changes:
* df-problems.c (df_simulate_one_insn_forwards): Fix braces in
switch.
* gcov.c (read_count_file): Add braces around variables declared
before label.
* cp/parser.c (cp_parser_direct_declarator): Add braces around
variables declared before label.
I think there are also warnings, not errors, on libiberty/regex.c and
gcc/unwind-dw2-fde-glibc.c.
Ian