PR c++/28387
* decl2.c (cplus_decl_attributes): Check for invalid decls.
* g++.dg/ext/attrib24.C: New test.
From-SVN: r115465
+2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/28387
+ * decl2.c (cplus_decl_attributes): Check for invalid decls.
+
2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28343
void
cplus_decl_attributes (tree *decl, tree attributes, int flags)
{
- if (*decl == NULL_TREE || *decl == void_type_node)
+ if (*decl == NULL_TREE || *decl == void_type_node
+ || *decl == error_mark_node)
return;
if (TREE_CODE (*decl) == TEMPLATE_DECL)
+2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/28387
+ * g++.dg/ext/attrib24.C: New test.
+
2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28343
--- /dev/null
+// PR c++/28387
+// { dg-do compile }
+
+enum __attribute__((unused)) E; // { dg-error "without previous declaration" }