PR c++/26070
* decl.c (grokdeclarator): Clear RID_STATIC together with staticp.
* g++.dg/other/virtual1.C: New test.
From-SVN: r110750
+2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/26070
+ * decl.c (grokdeclarator): Clear RID_STATIC together with staticp.
+
2006-02-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
Backport:
if (virtualp && staticp == 2)
{
- error ("member `%D' cannot be declared both virtual and static",
- dname);
+ error ("member `%D' cannot be declared both virtual and static", dname);
+ RIDBIT_RESET (RID_STATIC, specbits);
staticp = 0;
}
friendp = RIDBIT_SETP (RID_FRIEND, specbits);
+2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/26070
+ * g++.dg/other/virtual1.C: New test.
+
2006-02-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
Backport:
--- /dev/null
+// PR c++/26070
+// { dg-do compile }
+
+struct A
+{
+ virtual static int i; // { dg-error "virtual" }
+};