[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Invalid C output for !defined (YYPARSE_PARAM) && !defined (__STDC__) &&

From: Hans Breuer
Subject: Invalid C output for !defined (YYPARSE_PARAM) && !defined (__STDC__) && !defined (__STDC__)
Date: Sun, 14 Jan 2007 16:06:35 +0100
User-agent: Thunderbird (Windows/20061207)

Bison 2.1 and 2.2 generate invalid C ouput, which breaks the build for a
gimp plug-in [1]. A stray semicolon occures since 2.1, former version may
have differnt issues, but not that semicolon [2]. The offending generated
part is below. Look for my comment "this is the bug!".

I've tried to locate the issue in yacc.c but apparently my m4 skills are
too non existent to fix it ;)



| yyparse.  |

# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
yyparse (void)
yyparse ()
    ; /* <-- this is the bug! */

  int yystate;
  int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */


It gives the rather obvious error message:

        cd imagemap
        nmake -nologo -f ..\makefile.msc GIMPTOP=..\.. PLUGIN=imagemap
EXTRA_imagemap=1 all
        cl -nologo -G5 -GF -Zi -MD -W2 -Zm400 -FImsvc_recommended_pragmas.h
-DHAVE_CONFIG_H  -DLOCALEDIR=\"?\"  -I..\.. -I. -I..\..\plug-ins
-FIstring.h -FIstdlib.h  -I ..\..\..\glib -I ..\..\..\glib\glib -I
..\..\..\glib\gmodule -I d:\devel\my-gtk\other\intl-tml -I ..\..\../atk
-I..\..\../gtk+\gdk -I..\..\../gtk+\gdk -I..\..\../gtk+ -I..\..\../pango
-I..\..\../atk -I d:\devel\my-gtk\cairo\cairo-1.2.4\src -I
d:\devel\my-gtk\cairo\cairo-1.2.4\libpixman\src -I
d:\devel\my-gtk\cairo\cairo-1.2.4 -I..\..\..\dev\include -I
..\..\..\dev\include -I ..\..\..\dev\include\freetype2 -I
d:\devel\my-gtk\other\intl-tml -c imap_csim_parse.c
y.tab.c(1043) : error C2449: found '{' at file scope (missing function header?)
y.tab.c(1788) : error C2059: syntax error : '}'

[1] http://bugzilla.gnome.org/show_bug.cgi?id=396261

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert

reply via email to

[Prev in Thread] Current Thread [Next in Thread]