parser.c (cp_parser_init_declarator): Avoid redundant cp_finish_decl for member decla...
authorJason Merrill <jason@redhat.com>
Thu, 31 Mar 2011 20:28:31 +0000 (16:28 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 31 Mar 2011 20:28:31 +0000 (16:28 -0400)
* parser.c (cp_parser_init_declarator): Avoid redundant
cp_finish_decl for member declarations.

From-SVN: r171796

gcc/cp/ChangeLog
gcc/cp/parser.c

index 584421536c0b51f85c4e0bb685636178ae8e0bf9..c2f983103976704956bfbc46fc2f5ef7e9dd4f98 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-31  Jason Merrill  <jason@redhat.com>
+
+       * parser.c (cp_parser_init_declarator): Avoid redundant
+       cp_finish_decl for member declarations.
+
 2011-03-30  Jason Merrill  <jason@redhat.com>
 
        PR c++/48212
index 3a60d0f81ea5d63143e66ed76aec6e128bfb47df..9ed3a1f7ec421b20b3e4c48a23e359b1dc30f0dd 100644 (file)
@@ -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,