Commit af02935e by Volker Reichelt Committed by Volker Reichelt

re PR c++/26071 (ICE declaring destructor virtual and static)

	PR c++/26071
	* decl.c (grokdeclarator): Set dname also for destructor.

	* g++.dg/other/virtual2.C: New test.

From-SVN: r110751
parent 7e1e0765
2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/26071
* decl.c (grokdeclarator): Set dname also for destructor.
PR c++/26070 PR c++/26070
* decl.c (grokdeclarator): Clear storage_class together with staticp. * decl.c (grokdeclarator): Clear storage_class together with staticp.
......
...@@ -6745,6 +6745,7 @@ grokdeclarator (const cp_declarator *declarator, ...@@ -6745,6 +6745,7 @@ grokdeclarator (const cp_declarator *declarator,
type = TREE_OPERAND (decl, 0); type = TREE_OPERAND (decl, 0);
name = IDENTIFIER_POINTER (constructor_name (type)); name = IDENTIFIER_POINTER (constructor_name (type));
dname = decl;
} }
break; break;
......
2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/26071
* g++.dg/other/virtual2.C: New test.
PR c++/26070 PR c++/26070
* g++.dg/other/virtual1.C: New test. * g++.dg/other/virtual1.C: New test.
// PR c++/26071
// { dg-do compile }
struct A
{
virtual static ~A(); // { dg-error "virtual" }
};
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