mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 01:33:03 +00:00
Avoid warnings from gcc -Wundef y.tab.c.
* data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are defined before using them. * data/lalr1.cc: Likewise. * data/yacc.c: Likewise.
This commit is contained in:
committed by
Joel E. Denny
parent
c843aaab35
commit
ae93128c96
@@ -1,3 +1,11 @@
|
|||||||
|
2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
|
||||||
|
|
||||||
|
Avoid warnings from gcc -Wundef y.tab.c.
|
||||||
|
* data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
|
||||||
|
defined before using them.
|
||||||
|
* data/lalr1.cc: Likewise.
|
||||||
|
* data/yacc.c: Likewise.
|
||||||
|
|
||||||
2009-12-15 Joel E. Denny <jdenny@clemson.edu>
|
2009-12-15 Joel E. Denny <jdenny@clemson.edu>
|
||||||
|
|
||||||
autoconf: update to latest for fix of M4 detection.
|
autoconf: update to latest for fix of M4 detection.
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ b4_percent_code_get[]dnl
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef YY_
|
#ifndef YY_
|
||||||
# if YYENABLE_NLS
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||||
# if ENABLE_NLS
|
# if ENABLE_NLS
|
||||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
@@ -2264,7 +2264,7 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
|
|||||||
yychar = YYEMPTY;
|
yychar = YYEMPTY;
|
||||||
yylval = yyval_default;
|
yylval = yyval_default;
|
||||||
]b4_locations_if([
|
]b4_locations_if([
|
||||||
#if YYLTYPE_IS_TRIVIAL
|
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ m4_if(b4_prefix, [yy], [],
|
|||||||
b4_percent_code_get[]dnl
|
b4_percent_code_get[]dnl
|
||||||
|
|
||||||
[#ifndef YY_
|
[#ifndef YY_
|
||||||
# if YYENABLE_NLS
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||||
# if ENABLE_NLS
|
# if ENABLE_NLS
|
||||||
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
# include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
|
||||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ typedef short int yytype_int16;
|
|||||||
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
||||||
|
|
||||||
#ifndef YY_
|
#ifndef YY_
|
||||||
# if YYENABLE_NLS
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
||||||
# if ENABLE_NLS
|
# if ENABLE_NLS
|
||||||
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
||||||
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
# define YY_(msgid) dgettext ("bison-runtime", msgid)
|
||||||
@@ -668,7 +668,7 @@ while (YYID (0))
|
|||||||
we won't break user code: when these are the locations we know. */
|
we won't break user code: when these are the locations we know. */
|
||||||
|
|
||||||
#ifndef YY_LOCATION_PRINT
|
#ifndef YY_LOCATION_PRINT
|
||||||
# if YYLTYPE_IS_TRIVIAL
|
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||||
# define YY_LOCATION_PRINT(File, Loc) \
|
# define YY_LOCATION_PRINT(File, Loc) \
|
||||||
fprintf (File, "%d.%d-%d.%d", \
|
fprintf (File, "%d.%d-%d.%d", \
|
||||||
(Loc).first_line, (Loc).first_column, \
|
(Loc).first_line, (Loc).first_column, \
|
||||||
@@ -1192,7 +1192,7 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[
|
|||||||
yyvsp = yyvs;]b4_locations_if([[
|
yyvsp = yyvs;]b4_locations_if([[
|
||||||
yylsp = yyls;
|
yylsp = yyls;
|
||||||
|
|
||||||
#if YYLTYPE_IS_TRIVIAL
|
#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||||
/* Initialize the default location before parsing starts. */
|
/* Initialize the default location before parsing starts. */
|
||||||
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
|
||||||
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
|
||||||
|
|||||||
Reference in New Issue
Block a user