mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
c++: use __attribute__((__pure__)) to avoid warnings
Building C++ parsers with -Wsuggest-attribute=const and -Wsuggest-attribute=noreturn triggers warning in generated code. * data/lalr1.cc: Call b4_attribute_define. (debug_stream, debug_level): Flag as pure. * tests/headers.at (Several parsers): There are now more YY macros that "leak".
This commit is contained in:
@@ -223,7 +223,11 @@ AT_CHECK([[$PERL -n -0777 -e '
|
||||
s{/\*.*?\*/}{}gs;
|
||||
s{//.*}{}g;
|
||||
s{\b(YYChar
|
||||
|YYPUSH_MORE(_DEFINED)?
|
||||
|YYPUSH_MORE(?:_DEFINED)?
|
||||
|YYUSE
|
||||
|YY_ATTRIBUTE(?:_PURE|_UNUSED)?
|
||||
|YY_IGNORE_MAYBE_UNINITIALIZED_(?:BEGIN|END)
|
||||
|YY_INITIAL_VALUE
|
||||
|YY_\w+_INCLUDED
|
||||
|YY_NULL
|
||||
|(defined|if)\ YYDEBUG
|
||||
|
||||
Reference in New Issue
Block a user