From: Jason Merrill Date: Thu, 31 Mar 2011 20:28:31 +0000 (-0400) Subject: parser.c (cp_parser_init_declarator): Avoid redundant cp_finish_decl for member decla... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4e36c2131fcffc92881baa8dca67c868574bfacb;p=gcc.git parser.c (cp_parser_init_declarator): Avoid redundant cp_finish_decl for member declarations. * parser.c (cp_parser_init_declarator): Avoid redundant cp_finish_decl for member declarations. From-SVN: r171796 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 584421536c0..c2f98310397 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-31 Jason Merrill + + * parser.c (cp_parser_init_declarator): Avoid redundant + cp_finish_decl for member declarations. + 2011-03-30 Jason Merrill PR c++/48212 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 3a60d0f81ea..9ed3a1f7ec4 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -14501,9 +14501,9 @@ cp_parser_init_declarator (cp_parser* parser, cp_parser_save_default_args (parser, decl); } - /* Finish processing the declaration. But, skip friend + /* Finish processing the declaration. But, skip member declarations. */ - if (!friend_p && decl && decl != error_mark_node && !range_for_decl_p) + if (!member_p && decl && decl != error_mark_node && !range_for_decl_p) { cp_finish_decl (decl, initializer, !is_non_constant_init,