* decl.c (grokdeclarator): Clear storage_class together with staticp.
* g++.dg/other/virtual1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110747
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/26070
+ * decl.c (grokdeclarator): Clear storage_class together with staticp.
+
2006-02-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
if (virtualp && staticp == 2)
{
error ("member %qD cannot be declared both virtual and static", dname);
+ storage_class = sc_none;
staticp = 0;
}
friendp = !! declspecs->specs[(int)ds_friend];
+2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/26070
+ * g++.dg/other/virtual1.C: New test.
+
2006-02-08 Paolo Bonzini <bonzini@gnu.org>
* lib/gcc-dg.exp (cleanup-rtl-dump, cleanup-tree-dump,
--- /dev/null
+// PR c++/26070
+// { dg-do compile }
+
+struct A
+{
+ virtual static int i; // { dg-error "virtual" }
+};