diff options
-rw-r--r-- | data/lalr1.cc | 5 | ||||
-rw-r--r-- | tests/headers.at | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/data/lalr1.cc b/data/lalr1.cc index a3784637..cb61ebb7 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -157,6 +157,7 @@ m4_define([b4_shared_declarations], ]b4_bison_locations_if([[# include "location.hh"]])])[ ]b4_variant_if([b4_variant_includes])[ +]b4_attribute_define[ ]b4_YYDEBUG_define[ ]b4_namespace_open[ @@ -183,14 +184,14 @@ b4_location_define])])[ #if ]b4_api_PREFIX[DEBUG /// The current debugging stream. - std::ostream& debug_stream () const; + std::ostream& debug_stream () const YY_ATTRIBUTE_PURE; /// Set the current debugging stream. void set_debug_stream (std::ostream &); /// Type for debugging levels. typedef int debug_level_type; /// The current debugging level. - debug_level_type debug_level () const; + debug_level_type debug_level () const YY_ATTRIBUTE_PURE; /// Set the current debugging level. void set_debug_level (debug_level_type l); #endif diff --git a/tests/headers.at b/tests/headers.at index 0ad7ef3e..9b71c030 100644 --- a/tests/headers.at +++ b/tests/headers.at @@ -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 |