diff options
author | Mark Mitchell <mark@codesourcery.com> | 2006-04-12 16:58:24 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2006-04-12 16:58:24 +0000 |
commit | aa9d194eec39c73ac45c617a2df0efc4435db8b7 (patch) | |
tree | e4256b3282a289a9d71347a4417fa1e39ab19043 | |
parent | 21137095e248e737644793fe328322e55d783dd8 (diff) | |
download | gcc-aa9d194eec39c73ac45c617a2df0efc4435db8b7.zip gcc-aa9d194eec39c73ac45c617a2df0efc4435db8b7.tar.gz gcc-aa9d194eec39c73ac45c617a2df0efc4435db8b7.tar.bz2 |
parser.c (cp_parser_init_declarator): Initialize local variables aggressively.
* parser.c (cp_parser_init_declarator): Initialize local variables
aggressively.
From-SVN: r112891
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parser.c | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9e5788a..517de89 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2006-04-12 Mark Mitchell <mark@codesourcery.com> + + * parser.c (cp_parser_init_declarator): Initialize local variables + aggressively. + 2006-04-12 Roger Sayle <roger@eyesopen.com> * parser.c (cp_parser_init_declarator): Initialise diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index e96165b..fede4df 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -11093,6 +11093,9 @@ cp_parser_init_declarator (cp_parser* parser, } /* Parse the initializer. */ + initializer = NULL_TREE; + is_parenthesized_init = false; + is_non_constant_init = true; if (is_initialized) { if (declarator->kind == cdk_function @@ -11104,12 +11107,6 @@ cp_parser_init_declarator (cp_parser* parser, &is_parenthesized_init, &is_non_constant_init); } - else - { - initializer = NULL_TREE; - is_parenthesized_init = false; - is_non_constant_init = true; - } /* The old parser allows attributes to appear after a parenthesized initializer. Mark Mitchell proposed removing this functionality |