mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Simplify y.tab.c when location tracking is disabled.
* data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
tracking is not enabled. Instead, unconditionally define
YY_LOCATION_PRINT as a no-op for backward compatibility.
(cherry picked from commit fcd32abd3a)
This commit is contained in:
committed by
Joel E. Denny
parent
06caf0e144
commit
874ac415b9
@@ -1,3 +1,10 @@
|
|||||||
|
2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
|
||||||
|
|
||||||
|
Simplify y.tab.c when location tracking is disabled.
|
||||||
|
* data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
|
||||||
|
tracking is not enabled. Instead, unconditionally define
|
||||||
|
YY_LOCATION_PRINT as a no-op for backward compatibility.
|
||||||
|
|
||||||
2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
|
2009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
|
||||||
|
|
||||||
Avoid warnings from gcc -Wundef y.tab.c.
|
Avoid warnings from gcc -Wundef y.tab.c.
|
||||||
|
|||||||
@@ -730,7 +730,7 @@ while (YYID (0))
|
|||||||
while (YYID (0))
|
while (YYID (0))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
]b4_locations_if([[
|
||||||
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
||||||
This macro was not mandated originally: define only if we know
|
This macro was not mandated originally: define only if we know
|
||||||
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. */
|
||||||
@@ -745,7 +745,13 @@ while (YYID (0))
|
|||||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
]], [[
|
||||||
|
/* This macro is provided for backward compatibility. */
|
||||||
|
|
||||||
|
#ifndef YY_LOCATION_PRINT
|
||||||
|
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||||
|
#endif
|
||||||
|
]])[
|
||||||
|
|
||||||
/* YYLEX -- calling `yylex' with the right arguments. */
|
/* YYLEX -- calling `yylex' with the right arguments. */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user