mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
glr2.cc: fix warning about local variable vs. member
Fix a warning triggered in GCC (at least from 4.6 to 4.9):
input.cc: In constructor 'glr_stack_item::glr_stack_item(bool)':
input.cc:1371:5: error: declaration of 'is_state' shadows a member of 'this' [-Werror=shadow]
: is_state_(is_state)
^
* data/skeletons/glr2.cc (glr_stack_item): Alpha-convert.
This commit is contained in:
@@ -1211,10 +1211,10 @@ class semantic_option {
|
|||||||
class glr_stack_item
|
class glr_stack_item
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
glr_stack_item(bool is_state = true)
|
glr_stack_item (bool state = true)
|
||||||
: is_state_(is_state)
|
: is_state_ (state)
|
||||||
{
|
{
|
||||||
if (is_state)
|
if (is_state_)
|
||||||
new (&raw_) glr_state;
|
new (&raw_) glr_state;
|
||||||
else
|
else
|
||||||
new (&raw_) semantic_option;
|
new (&raw_) semantic_option;
|
||||||
|
|||||||
Reference in New Issue
Block a user