glr2.cc: don't publish YY_EXCEPTIONS

We don't need them in the header file.

* data/skeletons/glr2.cc (YY_EXCEPTIONS): Define only in the
implementation file.
* tests/headers.at (Several Parsers): Also check glr2.cc.
This commit is contained in:
Akim Demaille
2021-09-08 08:18:35 +02:00
parent 2142e59155
commit ca96df89b2
2 changed files with 15 additions and 11 deletions

View File

@@ -208,15 +208,6 @@ m4_define([b4_shared_declarations],
[[# include ]b4_location_include])[
]b4_variant_if([b4_variant_includes])[
// Whether we are compiled with exception support.
#ifndef YY_EXCEPTIONS
# if defined __GNUC__ && !defined __EXCEPTIONS
# define YY_EXCEPTIONS 0
# else
# define YY_EXCEPTIONS 1
# endif
#endif
]b4_YYDEBUG_define[
class glr_stack;
@@ -457,6 +448,15 @@ static ]b4_namespace_ref[::]b4_parser_class[::value_type yyval_default;
# endif
#endif
// Whether we are compiled with exception support.
#ifndef YY_EXCEPTIONS
# if defined __GNUC__ && !defined __EXCEPTIONS
# define YY_EXCEPTIONS 0
# else
# define YY_EXCEPTIONS 1
# endif
#endif
#ifndef YYFREE
# define YYFREE free
#endif