re PR c++/20646 (ICE on illegal code: "extern static" struct member)
PR c++/20646 * decl.c (grokdeclarator): Reset storage_class after error. * g++.dg/other/mult-stor1.C: New test. From-SVN: r102935
This commit is contained in:
parent
e04f4a0c4d
commit
a23e08d92d
@ -1,3 +1,8 @@
|
||||
2005-08-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/20646
|
||||
* decl.c (grokdeclarator): Reset storage_class after error.
|
||||
|
||||
2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/22508
|
||||
|
@ -7064,7 +7064,10 @@ grokdeclarator (const cp_declarator *declarator,
|
||||
/* Warn about storage classes that are invalid for certain
|
||||
kinds of declarations (parameters, typenames, etc.). */
|
||||
if (declspecs->multiple_storage_classes_p)
|
||||
error ("multiple storage classes in declaration of %qs", name);
|
||||
{
|
||||
error ("multiple storage classes in declaration of %qs", name);
|
||||
storage_class = sc_none;
|
||||
}
|
||||
else if (thread_p
|
||||
&& ((storage_class
|
||||
&& storage_class != sc_extern
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-08-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/20646
|
||||
* g++.dg/other/mult-stor1.C: New test.
|
||||
|
||||
2005-08-09 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
* gcc.c-torture/pr18299-1.c: Move to ...
|
||||
|
8
gcc/testsuite/g++.dg/other/mult-stor1.C
Normal file
8
gcc/testsuite/g++.dg/other/mult-stor1.C
Normal file
@ -0,0 +1,8 @@
|
||||
// PR c++/20646
|
||||
// Origin: Dan Rosen <dan.rosen@gmail.com>
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
extern static int i; // { dg-error "multiple storage classes" }
|
||||
};
|
Loading…
Reference in New Issue
Block a user