c++: fix signedness issues

* data/lalr1.cc, data/stack.hh: The callers of stack use int, while
stack is based on size_type.  Add overloads to avoid warnings.
This commit is contained in:
Akim Demaille
2018-10-22 08:36:01 +02:00
parent 4b0efdeb28
commit 0021bc3e28
2 changed files with 25 additions and 8 deletions

View File

@@ -360,7 +360,7 @@ m4_define([b4_shared_declarations],
void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
/// Pop \a n symbols from the stack.
void yypop_ (unsigned n = 1);
void yypop_ (int n = 1);
/// Constants.
enum
@@ -689,7 +689,7 @@ m4_if(b4_prefix, [yy], [],
}
void
]b4_parser_class_name[::yypop_ (unsigned n)
]b4_parser_class_name[::yypop_ (int n)
{
yystack_.pop (n);
}