bug-bison
[Top][All Lists]
Advanced

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

Re: Bison 1.50 Bug - Parsing Error - Examples Enclosed - Correct Attachm


From: Paul Eggert
Subject: Re: Bison 1.50 Bug - Parsing Error - Examples Enclosed - Correct Attachments
Date: Sun, 13 Oct 2002 13:43:39 -0700 (PDT)

> From: Akim Demaille <address@hidden>
> Date: 13 Oct 2002 17:26:15 +0200
> 
> This patch kills the possibility for the parser to include the header,
> since they both define the enum unconditionally.  Bison itself is the
> first victim.

Sorry about that.  I installed this patch.  Hmm, I see that I also
removed the __STDC__ stuff but that's OK as enums are in K&R C.

2002-10-13  Paul Eggert  <address@hidden>

        * data/c.m4 (b4_token_defines): Protect against double-inclusion
        by wrapping enum yytokentype's definition inside #ifndef
        YYTOKENTYPE.  This undoes a bug I introduced on 2002-10-12.

Index: c.m4
===================================================================
RCS file: /cvsroot/bison/bison/data/c.m4,v
retrieving revision 1.6
retrieving revision 1.7
diff -p -u -r1.6 -r1.7
--- c.m4        12 Oct 2002 23:18:52 -0000      1.6
+++ c.m4        13 Oct 2002 20:35:06 -0000      1.7
@@ -107,7 +107,8 @@ m4_define([b4_token_enum],
 m4_define([b4_token_defines],
 [m4_if(address@hidden, [[]], [],
 [/* Tokens.  */
-#if defined (__STDC__) || defined (__cplusplus)
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
    /* Put the tokens into the symbol table, so that GDB and other debuggers
       know about them.  */
    enum yytokentype {




reply via email to

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