Commit 6ae9b875 by Volker Reichelt Committed by Volker Reichelt

re PR c++/28387 (ICE with attribute on invalid declaration)

	PR c++/28387
	* decl2.c (cplus_decl_attributes): Check for invalid decls.

	* g++.dg/ext/attrib24.C: New test.

From-SVN: r115465
parent 72aeff7c
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
......
......@@ -997,7 +997,8 @@ grokbitfield (const cp_declarator *declarator,
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
// PR c++/28387
// { dg-do compile }
enum __attribute__((unused)) E; // { dg-error "without previous declaration" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment