Hi,

for 4.9 I'd like to clean-up a bit grokdeclarator: today I noticed this low hanging fruit which seems straightforward enough for 4.8.0 too (unless it hints to a bug?!?)

Thanks,
Paolo.

//////////////////////////
2013-03-01  Paolo Carlini  <paolo.carl...@oracle.com>

        * decl.c (grokdeclarator): Remove dead code.
Index: decl.c
===================================================================
--- decl.c      (revision 196362)
+++ decl.c      (working copy)
@@ -8599,7 +8599,6 @@ grokdeclarator (const cp_declarator *declarator,
   int explicit_int = 0;
   int explicit_char = 0;
   int defaulted_int = 0;
-  tree dependent_name = NULL_TREE;
 
   tree typedef_decl = NULL_TREE;
   const char *name = NULL;
@@ -9196,12 +9195,6 @@ grokdeclarator (const cp_declarator *declarator,
     }
   friendp = decl_spec_seq_has_spec_p (declspecs, ds_friend);
 
-  if (dependent_name && !friendp)
-    {
-      error ("%<%T::%D%> is not a valid declarator", ctype, dependent_name);
-      return error_mark_node;
-    }
-
   /* Issue errors about use of storage classes for parameters.  */
   if (decl_context == PARM)
     {

Reply via email to