------- Comment #4 from reichelt at gcc dot gnu dot org  2006-04-18 10:43 
-------
Hi Mark,
I was just testing the following btw.:

===================================================================
--- gcc/gcc/cp/parser.c (revision 112814)
+++ gcc/gcc/cp/parser.c (working copy)
@@ -10930,6 +10930,12 @@ cp_parser_init_declarator (cp_parser* parser,
      we compute it now.  */
   scope = get_scope_of_declarator (declarator);

+  if (scope && TYPE_P (scope) && !CLASS_TYPE_P (scope))
+    {
+      error ("type %qT is not allowed in declaration", scope);
+      return error_mark_node;
+    }
+
   /* If we're allowing GNU extensions, look for an asm-specification
      and attributes.  */
   if (cp_parser_allow_gnu_extensions_p (parser))
===================================================================

This should also fix PR 11471.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27102

Reply via email to