From fe8061e24696701bbc6facece00beea37eecf0f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Tue, 5 Sep 2000 21:33:24 +0200
Subject: [PATCH] Now allows prototypes with multiple unnamed arguments again.
 Fixes [Bug 202].

Rev: src/language.yacc:1.211
---
 src/language.yacc | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/language.yacc b/src/language.yacc
index f9f622ec37..93bd201551 100644
--- a/src/language.yacc
+++ b/src/language.yacc
@@ -110,7 +110,7 @@
 /* This is the grammar definition of Pike. */
 
 #include "global.h"
-RCSID("$Id: language.yacc,v 1.210 2000/09/05 02:18:12 hubbe Exp $");
+RCSID("$Id: language.yacc,v 1.211 2000/09/05 19:33:24 grubba Exp $");
 #ifdef HAVE_MEMORY_H
 #include <memory.h>
 #endif
@@ -928,7 +928,7 @@ new_arg_name: type7 optional_dot_dot_dot optional_identifier
     }
 
     if($3->u.sval.u.string->len &&
-	islocal($3->u.sval.u.string) >= 0)
+       islocal($3->u.sval.u.string) >= 0)
       my_yyerror("Variable '%s' appears twice in argument list.",
 		 $3->u.sval.u.string->str);
     
@@ -3315,14 +3315,19 @@ int low_add_local_name(struct compiler_frame *frame,
 			struct pike_string *type,
 			node *def)
 {
-  int tmp=islocal(str);
-  if(tmp >= frame->last_block_level)
-  {
-    if(str->size_shift)
-      my_yyerror("Duplicate local variable, previous declaration on line %d\n",
-		 frame->variable[tmp].line);
-    else
-      my_yyerror("Duplicate local variable '%s', previous declaration on line %d\n",STR0(str),frame->variable[tmp].line);
+  if (str->len) {
+    int tmp=islocal(str);
+    if(tmp >= frame->last_block_level)
+    {
+      if(str->size_shift)
+	my_yyerror("Duplicate local variable, "
+		   "previous declaration on line %d\n",
+		   frame->variable[tmp].line);
+      else
+	my_yyerror("Duplicate local variable '%s', "
+		   "previous declaration on line %d\n",
+		   STR0(str), frame->variable[tmp].line);
+    }
   }
 
   debug_malloc_touch(def);
-- 
GitLab