+2007-08-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/28558
+ * decl.c (groktypename): Ignore attributes applied to class type.
+
2007-08-28 Richard Guenther <rguenther@suse.de>
* decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
type_specifiers->attributes = NULL_TREE;
type = grokdeclarator (declarator, type_specifiers, TYPENAME, 0, &attrs);
if (attrs)
- cplus_decl_attributes (&type, attrs, 0);
+ {
+ if (CLASS_TYPE_P (type))
+ warning (OPT_Wattributes, "ignoring attributes applied to class type "
+ "outside of definition");
+ else
+ cplus_decl_attributes (&type, attrs, 0);
+ }
return type;
}