This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]