Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 1999 08:46:10 -0700 (PDT)
From:      vadim@gc.lviv.ua
To:        freebsd-gnats-submit@freebsd.org
Subject:   gnu/12868: Bison-1.25 bug in template
Message-ID:  <19990729154610.8E22C14E98@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         12868
>Category:       gnu
>Synopsis:       Bison-1.25 bug in template
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 29 08:50:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Vadim Chekan
>Release:        FreeBSD-3.2
>Organization:
GC
>Environment:
FreeBSD gate.gc.lviv.ua 3.1-STABLE FreeBSD 3.1-STABLE #0: Sun May 23 16:49:39 EE
ST 1999     vadim@gate.gc.lviv.ua:/usr/src/sys/compile/GATE.3  i386
>Description:
In bison-1.25 which is in FreeBSD distribution in 
/usr/share/bison.simple is error which does impossible to compile *.y files
if YYPARSE_PARAM is defined
I get the error:
/usr/home/vadim/projects > bison.old test.y && cc -c test.tab.c
/usr/share/misc/bison.simple: In function `yyparse':
/usr/share/misc/bison.simple:219: number of arguments doesn't match prototype
/usr/share/misc/bison.simple:153: prototype declaration


>How-To-Repeat:
bison test.y && cc -c test.tab.c
===>Begin test.y
%{
#define YYPARSE_PARAM param
%}
%token T_STRING
%%
input:          T_STRING ;
%%
===>End test.y

>Fix:
--- bison.simple.old    Thu Jul 29 17:49:44 1999
+++ bison.simple.new    Thu Jul 29 17:50:11 1999
@@ -150,8 +150,12 @@

 /* Prevent warning if -Wstrict-prototypes.  */
 #ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
 int yyparse (void);
 #endif
+#endif
 ^L
 #if __GNUC__ > 1               /* GNU C and GNU C++ define this.  */
 #define __yy_memcpy(TO,FROM,COUNT)     __builtin_memcpy(TO,FROM,COUNT)


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990729154610.8E22C14E98>