| Summary: | Bison-1.25 bug in template | ||
|---|---|---|---|
| Product: | Base System | Reporter: | vadim <vadim> |
| Component: | gnu | Assignee: | David E. O'Brien <obrien> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->obrien Bison and Yacc are David's babies. State Changed From-To: open->closed commited. Thanks!! |
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 Fix: /* 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)--1CSRp7dxny7QLIY4Ch9A7qUjZSS9Ecx6hMMWTGns8WNHZdE5 Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" --- bison.simple.old Thu Jul 29 17:49:44 1999 +++ bison.simple.new Thu Jul 29 17:50:11 1999 @@ -150,8 +150,12 @@ 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