On Tue, 15 Dec 2009, Joel E. Denny wrote: > > Thanks for the catch. I should have been saying -Wundef all this > > time.
> Two following two patches follow. > > Avoid warnings from gcc -Wunused y.tab.c. > Simplify y.tab.c when location tracking is disabled. Including the -Wundef correction, I pushed those patches and the following patches to master, branch-2.5, and branch-2.4.2 except that I omitted the b4_locations_if changes from branch-2.4.2. Thanks again for your contribution. >From c938d650dbddd3d94b3543bab76e1afce99c409d Mon Sep 17 00:00:00 2001 From: Joel E. Denny <[email protected]> Date: Wed, 16 Dec 2009 01:14:44 -0500 Subject: [PATCH] Document gcc -Wundef fix. * NEWS (2.4.2): Here. * THANKS (Jonathan Nieder): Add. --- ChangeLog | 6 ++++++ NEWS | 3 +++ THANKS | 1 + 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 029826f..3fedc38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-16 Joel E. Denny <[email protected]> + + Document gcc -Wundef fix. + * NEWS (2.4.2): Here. + * THANKS (Jonathan Nieder): Add. + 2009-12-15 Jonathan Nieder <[email protected]> (tiny change) Simplify y.tab.c when location tracking is disabled. diff --git a/NEWS b/NEWS index d585139..186b8e0 100644 --- a/NEWS +++ b/NEWS @@ -216,6 +216,9 @@ Bison News ** Detection of GNU M4 1.4.6 or newer during configure is improved. +** Warnings from gcc's -Wundef option about undefined YYENABLE_NLS and + YYLTYPE_IS_TRIVIAL in C/C++ parsers are now avoided. + ** %code is now a permanent feature. A traditional Yacc prologue directive is written in the form: diff --git a/THANKS b/THANKS index 67d6663..0a203ed 100644 --- a/THANKS +++ b/THANKS @@ -46,6 +46,7 @@ Jesse Thilo [email protected] Jim Kent [email protected] Jim Meyering [email protected] Joel E. Denny [email protected] +Jonathan Nieder [email protected] Juan Manuel Guerrero [email protected] Kees Zeelenberg [email protected] Keith Browne [email protected] -- 1.5.4.3 >From 19750d310c1f21b72fc26d0b8905fac08d175130 Mon Sep 17 00:00:00 2001 From: Joel E. Denny <[email protected]> Date: Wed, 16 Dec 2009 01:41:17 -0500 Subject: [PATCH] * data/yacc.c: Reformat m4 a little. --- ChangeLog | 4 ++++ data/yacc.c | 13 +++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3fedc38..97c8f6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-12-16 Joel E. Denny <[email protected]> + * data/yacc.c: Reformat m4 a little. + +2009-12-16 Joel E. Denny <[email protected]> + Document gcc -Wundef fix. * NEWS (2.4.2): Here. * THANKS (Jonathan Nieder): Add. diff --git a/data/yacc.c b/data/yacc.c index 711d41d..11ebbf1 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -660,9 +660,9 @@ while (YYID (0)) YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) -#endif +#endif]b4_locations_if([[ + -]b4_locations_if([[ /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ @@ -676,14 +676,15 @@ while (YYID (0)) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif -#endif -]], [[ +#endif]], [[ + + /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif -]])[ +#endif]])[ + /* YYLEX -- calling `yylex' with the right arguments. */ -- 1.5.4.3
