* 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/trunk@186345
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-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
* cvt.c (convert_to_void): Update comment.
error ("%<constexpr%> cannot be used for type declarations");
}
- if (declspecs->attributes && warn_attributes)
+ if (declspecs->attributes && warn_attributes && declared_type)
{
location_t loc;
if (!CLASS_TYPE_P (declared_type)
2012-04-11 Jason Merrill <jason@redhat.com>
+ PR c++/52906
+ * g++.dg/ext/attrib45.C: New.
+
* g++.dg/eh/dtor3.C: New.
2012-04-11 Richard Guenther <rguenther@suse.de>
--- /dev/null
+// PR c++/52906
+
+__attribute__ ((__deprecated__)); // { dg-error "does not declare anything" }