mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
* data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside extern "C" {}.
This commit is contained in:
@@ -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>
|
2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
|
||||||
|
|
||||||
* data/glr.c: Modify treatment of unused parameters to permit use
|
* data/glr.c: Modify treatment of unused parameters to permit use
|
||||||
|
|||||||
@@ -262,6 +262,9 @@ b4_syncline([@oline@], [@ofile@])[
|
|||||||
# ifndef YYSTACK_ALLOC_MAXIMUM
|
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||||||
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
|
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
# endif
|
||||||
# ifndef YYMALLOC
|
# ifndef YYMALLOC
|
||||||
# define YYMALLOC malloc
|
# define YYMALLOC malloc
|
||||||
# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
|
# 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 */
|
void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef __cplusplus
|
||||||
|
}
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
||||||
|
|
||||||
|
|||||||
@@ -327,6 +327,9 @@ typedef struct YYLTYPE
|
|||||||
# ifndef YYSTACK_ALLOC_MAXIMUM
|
# ifndef YYSTACK_ALLOC_MAXIMUM
|
||||||
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
|
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
# endif
|
||||||
# ifndef YYMALLOC
|
# ifndef YYMALLOC
|
||||||
# define YYMALLOC malloc
|
# define YYMALLOC malloc
|
||||||
# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
|
# 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 */
|
void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef __cplusplus
|
||||||
|
}
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
||||||
|
|
||||||
@@ -1165,8 +1171,8 @@ YYLTYPE yylloc;
|
|||||||
yylloc.start.line = yylloc.end.line = 1;
|
yylloc.start.line = yylloc.end.line = 1;
|
||||||
yylloc.start.column = yylloc.end.column = 0;
|
yylloc.start.column = yylloc.end.column = 0;
|
||||||
}
|
}
|
||||||
/* Line 863 of yacc.c. */
|
/* Line 869 of yacc.c. */
|
||||||
#line 1170 "parse-gram.c"
|
#line 1176 "parse-gram.c"
|
||||||
yyvsp[0] = yylval;
|
yyvsp[0] = yylval;
|
||||||
yylsp[0] = yylloc;
|
yylsp[0] = yylloc;
|
||||||
|
|
||||||
@@ -1750,8 +1756,8 @@ yyreduce:
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Line 1059 of yacc.c. */
|
/* Line 1065 of yacc.c. */
|
||||||
#line 1755 "parse-gram.c"
|
#line 1761 "parse-gram.c"
|
||||||
|
|
||||||
yyvsp -= yylen;
|
yyvsp -= yylen;
|
||||||
yyssp -= yylen;
|
yyssp -= yylen;
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ typedef union YYSTYPE {
|
|||||||
assoc assoc;
|
assoc assoc;
|
||||||
uniqstr uniqstr;
|
uniqstr uniqstr;
|
||||||
} YYSTYPE;
|
} YYSTYPE;
|
||||||
/* Line 1382 of yacc.c. */
|
/* Line 1388 of yacc.c. */
|
||||||
#line 148 "parse-gram.h"
|
#line 148 "parse-gram.h"
|
||||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||||
# define YYSTYPE_IS_DECLARED 1
|
# define YYSTYPE_IS_DECLARED 1
|
||||||
|
|||||||
Reference in New Issue
Block a user