mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 18:23:03 +00:00
glr2.cc: disable GCC 4.6 warning
231. conflicts.at:1096: testing Syntax error in consistent error state: glr2.cc ...
tests/conflicts.at:1096: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -o input input.cc $LIBS
input.cc: In member function 'YYRESULTTAG glr_stack::yyresolveValue(glr_state*)':
input.cc:2674:36: error: 'yysval' may be used uninitialized in this function [-Werror=uninitialized]
Do not initialize the variable: this way ASAN can really make sure we
do set it to a proper value.
If we initialize it, ASAN would report nothing.
* data/skeletons/c.m4 (YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN): Disable
GCC 4.6's -Wuninitialized.
* data/skeletons/glr2.cc: Disable the warning locally.
This commit is contained in:
@@ -2551,7 +2551,9 @@ public:
|
||||
if (yyflag == yyok)
|
||||
{
|
||||
yys->yyresolved = true;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
||||
yys->semanticVal() = yysval;
|
||||
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
||||
}
|
||||
else
|
||||
yys->setFirstVal(YY_NULLPTR);
|
||||
|
||||
Reference in New Issue
Block a user