mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
warnings: enable -Wuseless-cast, and eliminate warnings
Prompted by Frank Heckenbach. https://lists.gnu.org/archive/html/bug-bison/2019-11/msg00016.html. * configure.ac (warn_cxx): Add -Wuseless-cast. * data/skeletons/c.m4 (b4_attribute_define): Define YY_IGNORE_USELESS_CAST_BEGIN and YY_IGNORE_USELESS_CAST_END. * data/skeletons/glr.c (YY_FPRINTF): New, replaces YYFPRINTF, wrapped with YY_IGNORE_USELESS_CAST_BEGIN and YY_IGNORE_USELESS_CAST_END. (YY_DPRINTF): Likewise. * tests/actions.at: Remove useless cast. * tests/headers.at: Adjust.
This commit is contained in:
@@ -326,7 +326,7 @@ AT_PERL_CHECK([[-n -0777 -e '
|
||||
|YY_CONSTEXPR
|
||||
|YY_COPY
|
||||
|YY_CPLUSPLUS
|
||||
|YY_IGNORE_MAYBE_UNINITIALIZED_(?:BEGIN|END)
|
||||
|YY_IGNORE_(?:MAYBE_UNINITIALIZED|USELESS_CAST)_(?:BEGIN|END)
|
||||
|YY_INITIAL_VALUE
|
||||
|YY_MOVE
|
||||
|YY_MOVE_OR_COPY
|
||||
|
||||
Reference in New Issue
Block a user