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
This commit is contained in:
parent
72aeff7c56
commit
6ae9b8759e
@ -1,3 +1,8 @@
|
||||
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)
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
4
gcc/testsuite/g++.dg/ext/attrib24.C
Normal file
4
gcc/testsuite/g++.dg/ext/attrib24.C
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/28387
|
||||
// { dg-do compile }
|
||||
|
||||
enum __attribute__((unused)) E; // { dg-error "without previous declaration" }
|
Loading…
Reference in New Issue
Block a user