[Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Aug 9 22:02:00 GMT 2005
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-08-09 22:01 -------
Mark, are you still working on this one?
Btw, the following patch fixes the ICE for me.
Passed bootstrap and regtests.
===================================================================
--- gcc/gcc/cp/decl.c 1 Aug 2005 04:02:24 -0000 1.1416
+++ gcc/gcc/cp/decl.c 9 Aug 2005 13:10:55 -0000
@@ -7064,7 +7064,10 @@ grokdeclarator (const cp_declarator *dec
/* 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
===================================================================
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
More information about the Gcc-bugs
mailing list