mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
Don't use IF_LINT in Bison sources.
It creates unnecessary differences between the sources that Bison
maintainers build and test (given that maintainers normally
configure with --enable-gcc-warnings) and the sources that Bison
users build. Instead, use PACIFY_CC, which doesn't. This change
fixes compiler warnings reported by Tys Lefering at
<http://lists.gnu.org/archive/html/bison-patches/2011-05/msg00004.html>.
* configure.ac: Don't AC_DEFINE lint regardless of the configure
options. This change affects imported gnulib sources, where
IF_LINT still appears and depends on lint.
* src/scan-gram.l, src/scan-skel.l: Replace uses of IF_LINT with
PACIFY_CC.
* src/system.h (IF_LINT): Remove cpp macro.
(PACIFY_CC): New cpp macro.
(cherry picked from commit 77bb73e7af)
Conflicts:
src/scan-gram.l
This commit is contained in:
@@ -138,13 +138,13 @@ splice (\\[ \f\t\v]*\n)*
|
||||
%{
|
||||
/* Nesting level. Either for nested braces, or nested angle brackets
|
||||
(but not mixed). */
|
||||
int nesting IF_LINT (= 0);
|
||||
int nesting PACIFY_CC (= 0);
|
||||
|
||||
/* Parent context state, when applicable. */
|
||||
int context_state IF_LINT (= 0);
|
||||
int context_state PACIFY_CC (= 0);
|
||||
|
||||
/* Location of most recent identifier, when applicable. */
|
||||
location id_loc IF_LINT (= empty_location);
|
||||
location id_loc PACIFY_CC (= empty_location);
|
||||
|
||||
/* Where containing code started, when applicable. Its initial
|
||||
value is relevant only when yylex is invoked in the SC_EPILOGUE
|
||||
@@ -153,7 +153,7 @@ splice (\\[ \f\t\v]*\n)*
|
||||
|
||||
/* Where containing comment or string or character literal started,
|
||||
when applicable. */
|
||||
boundary token_start IF_LINT (= scanner_cursor);
|
||||
boundary token_start PACIFY_CC (= scanner_cursor);
|
||||
%}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user