Commit a23e08d9 by Volker Reichelt Committed by Volker Reichelt

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
parent e04f4a0c
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
......
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 ...
......
// PR c++/20646
// Origin: Dan Rosen <dan.rosen@gmail.com>
// { dg-do compile }
struct A
{
extern static int i; // { dg-error "multiple storage classes" }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment