* decl.c (grokdeclarator): Set dname also for destructor.
* g++.dg/other/virtual2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110751
138bc75d-0d04-0410-961f-
82ee72b054a4
2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/26071
+ * decl.c (grokdeclarator): Set dname also for destructor.
+
PR c++/26070
* decl.c (grokdeclarator): Clear storage_class together with staticp.
type = TREE_OPERAND (decl, 0);
name = IDENTIFIER_POINTER (constructor_name (type));
+ dname = decl;
}
break;
2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/26071
+ * g++.dg/other/virtual2.C: New test.
+
PR c++/26070
* g++.dg/other/virtual1.C: New test.
--- /dev/null
+// PR c++/26071
+// { dg-do compile }
+
+struct A
+{
+ virtual static ~A(); // { dg-error "virtual" }
+};