* decl.c (check_tag_decl): Don't complain about attributes if we
don't even have a type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@186435
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-04-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/52906
+ * decl.c (check_tag_decl): Don't complain about attributes if we
+ don't even have a type.
+
2012-04-05 Jason Merrill <jason@redhat.com>
PR c++/52596
error ("%<constexpr%> cannot be used for type declarations");
}
- if (declspecs->attributes)
+ if (declspecs->attributes && declared_type)
{
location_t loc = input_location;
if (!CLASS_TYPE_P (declared_type)
+2012-04-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/52906
+ * g++.dg/ext/attrib45.C: New.
+
2012-04-13 Tom de Vries <tom@codesourcery.com>
Backport from mainline r186419.
--- /dev/null
+// PR c++/52906
+
+__attribute__ ((__deprecated__)); // { dg-error "does not declare anything" }