yaozhenx / mscgen

Automatically exported from code.google.com/p/mscgen
GNU General Public License v2.0
0 stars 0 forks source link

Compile issue with recent version of bison #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

When recompiling mscgen (including src/language.y) with a recent version of 
bison (3.0.2 used here), mscgen fails to compile with yyparse having a 
conflicting prototype.

"""
> gcc -DHAVE_CONFIG_H -I. -I../../src -I..   -D_FORTIFY_SOURCE=2    -g -O2 
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c 
-o mscgen-language.o `test -f 'language.c' || echo '../../src/'`language.c
> language.c:464:5: error: conflicting types for 'yyparse'
>  int yyparse (void);
>      ^
> language.y:203:14: note: previous declaration of 'yyparse' was here
> language.c:1401:1: error: conflicting types for 'yyparse'
>  yyparse (void)
>  ^
> language.y:203:14: note: previous declaration of 'yyparse' was here
> language.y: In function 'yyparse':
> language.y:290:13: error: 'yyparse_result' undeclared (first use in this 
function)
> language.y:290:13: note: each undeclared identifier is reported only once for 
each function it appears in
> make[4]: *** [mscgen-language.o] Error 1
"""

(from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733370)

From the looks of it, this can be trivially solved by using bison option 
"%parse-param" (see attached patch).

Original issue reported on code.google.com by NThykier@gmail.com on 29 Dec 2013 at 1:02

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r202.

Original comment by Michael....@gmail.com on 24 Jan 2015 at 5:56