mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 19:23:02 +00:00
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'.
This commit is contained in:
@@ -896,8 +896,8 @@ b4_dollar_popdef])[]dnl
|
||||
[
|
||||
// Default location.
|
||||
{
|
||||
slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
|
||||
YYLLOC_DEFAULT (yylhs.location, slice, yylen);
|
||||
stack_type::slice range (yystack_, yylen);
|
||||
YYLLOC_DEFAULT (yylhs.location, range, yylen);
|
||||
yyerror_range[1].location = yylhs.location;
|
||||
}]])[
|
||||
|
||||
|
||||
Reference in New Issue
Block a user