]> git.saurik.com Git - bison.git/commitdiff
* data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside extern "C" {}.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 9 Jun 2005 20:44:28 +0000 (20:44 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 9 Jun 2005 20:44:28 +0000 (20:44 +0000)
ChangeLog
data/yacc.c
src/parse-gram.c
src/parse-gram.h

index 1e8215ef3e80ff9bbcc1bf7ce9281cdba7077890..309343cc5be868ee2ad4f286c553ad5800ea9087 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
+       extern "C" {}.  This fixes a problem reported by Paul Hilfinger,
+       which stems from the 2005-05-27 patch.
+
 2005-06-06  Paul Hilfinger  <hilfingr@tully.CS.Berkeley.EDU>
 
        * data/glr.c: Modify treatment of unused parameters to permit use
index 802e53d872e47ad2c7decad7416d05532f8c8380..6bf06d50c7fb0d344717a32006ec4a079d73b1f7 100644 (file)
@@ -262,6 +262,9 @@ b4_syncline([@oline@], [@ofile@])[
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
 #  endif
+#  ifdef __cplusplus
+extern "C" {
+#  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
 #   if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
@@ -276,6 +279,9 @@ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
+#  ifdef __cplusplus
+}
+#  endif
 # endif
 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
 
index c468acfcf8ced581e7e631a4f212fe61d7dbc690..a288edea586f0aa4530542bdcf1d9a88b677d2e7 100644 (file)
@@ -327,6 +327,9 @@ typedef struct YYLTYPE
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
 #  endif
+#  ifdef __cplusplus
+extern "C" {
+#  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
 #   if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
@@ -341,6 +344,9 @@ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
+#  ifdef __cplusplus
+}
+#  endif
 # endif
 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
 
@@ -1165,8 +1171,8 @@ YYLTYPE yylloc;
   yylloc.start.line   = yylloc.end.line   = 1;
   yylloc.start.column = yylloc.end.column = 0;
 }
-/* Line 863 of yacc.c.  */
-#line 1170 "parse-gram.c"
+/* Line 869 of yacc.c.  */
+#line 1176 "parse-gram.c"
   yyvsp[0] = yylval;
     yylsp[0] = yylloc;
 
@@ -1750,8 +1756,8 @@ yyreduce:
       default: break;
     }
 
-/* Line 1059 of yacc.c.  */
-#line 1755 "parse-gram.c"
+/* Line 1065 of yacc.c.  */
+#line 1761 "parse-gram.c"
 \f
   yyvsp -= yylen;
   yyssp -= yylen;
index ff137898022c299df37b6d3823902d13f55a9af8..fcf1ef15745d13dd881da207f17862fdde6a1781 100644 (file)
@@ -143,7 +143,7 @@ typedef union YYSTYPE {
   assoc assoc;
   uniqstr uniqstr;
 } YYSTYPE;
-/* Line 1382 of yacc.c.  */
+/* Line 1388 of yacc.c.  */
 #line 148 "parse-gram.h"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1