Bootstrap failure due to your fix for PR 26122
Volker Reichelt
reichelt@igpm.rwth-aachen.de
Wed Apr 12 09:19:00 GMT 2006
Mark,
your patch for PR26122 causes a bootstrap failure on mainline
(x86_64-unknown-linux-gnu) when compiling cp/parser.c:
cc1: warnings being treated as errors
../../gcc/gcc/cp/parser.c: In function 'cp_parser_init_declarator':
../../gcc/gcc/cp/parser.c:10895: warning: 'is_parenthesized_init' may be used uninitialized in this function
make[3]: *** [cp/parser.o] Error 1
Well, you didn't really break it, but your change probably exposed the
latent problem.
The culprit is in the following excerpt from cp_parser_init_declarator:
/* Parse the initializer. */
if (is_initialized)
{
if (declarator->kind == cdk_function
&& declarator->declarator->kind == cdk_id
&& initialization_kind == CPP_EQ)
initializer = cp_parser_pure_specifier (parser);
else
initializer = cp_parser_initializer (parser,
&is_parenthesized_init,
&is_non_constant_init);
}
else
{
initializer = NULL_TREE;
is_parenthesized_init = false;
is_non_constant_init = true;
}
If both if-conditions are true, is_parenthesized_init isn't initialized.
This also holds for is_non_constant_init, but the middle-end does not
catch that (yet). Maybe the whole outer else branch should be removed
and the variables be initialized at definition time.
Regards,
Volker
More information about the Gcc-patches
mailing list