On Mon, 2004-08-30 at 23:58, Henrik Bach wrote:> >From: Jeff Cohen <jeffc at jolt-lang.org>
> >Date: Mon, 30 Aug 2004 21:46:42 -0700
>
> >FileParser.tab.c: In function `int Fileparse()':
> >FileParser.tab.c:2043: error: syntax error before `goto'
> >
> >The offending lines bison generated are:
> >
> >/*----------------------------------------------------.
> >| yyerrlab1 -- error raised explicitly by an action. |
> >`----------------------------------------------------*/
> >yyerrlab1:
> >
> > /* Suppress GCC warning that yyerrlab1 is unused when no action
> > invokes YYERROR. */
> >#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 +
__GNUC_MINOR__)
> > __attribute__ ((__unused__))
> >#endif
> >
> > goto yyerrlab2; <== line 2043
> >
> >I'm using bison 1.875. But it worked the last time, so I don't
know why
> >it doesn't work now. Deleting the __attribute__ clause fixes it.
> >
>
> Or correctly terminate the statement/line with ; (although it becomes a
> warning about an empty statement).
>
> /Henrik
Actually the problem is that you can't apply __attribute((__unused__))
to a label in the versions of GCC that Bison is suggesting by the #if
directive. Please see
http://mail.gnu.org/archive/html/bug-bison/2004-01/msg00011.html
for the details on this bison bug.
Reid.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20040831/26f3e78d/attachment.sig>