re PR c++/26070 (ICE declaring data member virtual and static)
PR c++/26070 * decl.c (grokdeclarator): Clear storage_class together with staticp. * g++.dg/other/virtual1.C: New test. From-SVN: r110747
This commit is contained in:
parent
053007ce71
commit
7e1e0765bd
4 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -7128,6 +7128,7 @@ grokdeclarator (const cp_declarator *declarator,
|
|||
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];
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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,
|
||||
|
|
7
gcc/testsuite/g++.dg/other/virtual1.C
Normal file
7
gcc/testsuite/g++.dg/other/virtual1.C
Normal file
|
@ -0,0 +1,7 @@
|
|||
// PR c++/26070
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
virtual static int i; // { dg-error "virtual" }
|
||||
};
|
Loading…
Add table
Reference in a new issue