diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2019-01-13 10:08:31 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-01-13 12:26:58 +0100 |
commit | f9db426de696f5c5593531496ca154361e7b9ce4 (patch) | |
tree | 39c4434172b9cfc680ef39b9daf3449f1a2c5df6 /configure.ac | |
parent | c927c955c856abf1596455c2f65c1ffc6487ccc0 (diff) | |
download | bison-f9db426de696f5c5593531496ca154361e7b9ce4.tar.gz |
c++: beware of -Wshadow
This line:
slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
triggers warnings:
parse.h:1790:11: note: shadowed declaration is here
Reported by Frank Heckenbach.
http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00002.html
* configure.ac (warn_c): Move -Wshadow to...
(warn_common): here.
* data/skeletons/stack.hh (slice): Define as an inner class of stack.
* data/skeletons/lalr1.cc: Adjust.
Rename the variable as 'range' instead of 'slice'.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 0aa689ea..7fef652d 100644 --- a/configure.ac +++ b/configure.ac @@ -96,8 +96,8 @@ AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes]) if test "$enable_gcc_warnings" = yes; then warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align -fparse-all-comments -Wdocumentation - -Wformat -Wnull-dereference -Wpointer-arith -Wwrite-strings' - warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes' + -Wformat -Wnull-dereference -Wpointer-arith -Wshadow -Wwrite-strings' + warn_c='-Wbad-function-cast -Wstrict-prototypes' warn_cxx='-Wnoexcept' # Warnings for the test suite only. # |