From e3c888eb0e3923981bcb914f818c29a054843d9e Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sat, 2 Jun 2012 00:03:51 -0400 Subject: re PR c++/52973 (visibility attribute for class is not passed to its members) PR c++/52973 * parser.c (cp_parser_class_head): Apply attributes here. * semantics.c (begin_class_definition): Not here. * cp-tree.h: Adjust. From-SVN: r188137 --- gcc/cp/semantics.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gcc/cp/semantics.c') diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 263ebc2..8fefce0 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2516,7 +2516,7 @@ check_template_template_default_arg (tree argument) /* Begin a class definition, as indicated by T. */ tree -begin_class_definition (tree t, tree attributes) +begin_class_definition (tree t) { if (error_operand_p (t) || error_operand_p (TYPE_MAIN_DECL (t))) return error_mark_node; @@ -2573,9 +2573,6 @@ begin_class_definition (tree t, tree attributes) pushclass (t); TYPE_BEING_DEFINED (t) = 1; - cplus_decl_attributes (&t, attributes, (int) ATTR_FLAG_TYPE_IN_PLACE); - fixup_attribute_variants (t); - if (flag_pack_struct) { tree v; @@ -8696,7 +8693,7 @@ begin_lambda_type (tree lambda) xref_basetypes (type, /*bases=*/NULL_TREE); /* Start the class. */ - type = begin_class_definition (type, /*attributes=*/NULL_TREE); + type = begin_class_definition (type); if (type == error_mark_node) return error_mark_node; -- cgit v1.1