From 4e36c2131fcffc92881baa8dca67c868574bfacb Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 31 Mar 2011 16:28:31 -0400 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parser.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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, -- 2.30.2