mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 15:23:02 +00:00
doc: work around Flex's use of 'register'
The CI uses an old version of Flex. * doc/bison.texi (calc++/scanner.ll): Here.
This commit is contained in:
@@ -11422,10 +11422,9 @@ then the parser's to get the set of defined tokens.
|
|||||||
@comment file: calc++/scanner.ll
|
@comment file: calc++/scanner.ll
|
||||||
@example
|
@example
|
||||||
%@{
|
%@{
|
||||||
// Work around an incompatibility in flex (at least versions
|
// Work around an incompatibility in flex (at least versions 2.5.31 through
|
||||||
// 2.5.31 through 2.5.33): it generates code that does
|
// 2.5.33): it generates code that does not conform to C89. See Debian bug
|
||||||
// not conform to C89. See Debian bug 333231
|
// 333231 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>.
|
||||||
// <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>.
|
|
||||||
# undef yywrap
|
# undef yywrap
|
||||||
# define yywrap() 1
|
# define yywrap() 1
|
||||||
|
|
||||||
@@ -11435,6 +11434,8 @@ then the parser's to get the set of defined tokens.
|
|||||||
# pragma GCC diagnostic ignored "-Wnull-dereference"
|
# pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define FLEX_VERSION (YY_FLEX_MAJOR_VERSION * 100 + YY_FLEX_MINOR_VERSION)
|
||||||
|
|
||||||
// Old versions of Flex (2.5.35) generate an incomplete documentation comment.
|
// Old versions of Flex (2.5.35) generate an incomplete documentation comment.
|
||||||
//
|
//
|
||||||
// In file included from src/scan-code-c.c:3:
|
// In file included from src/scan-code-c.c:3:
|
||||||
@@ -11443,9 +11444,15 @@ then the parser's to get the set of defined tokens.
|
|||||||
// * @param line_number
|
// * @param line_number
|
||||||
// ~~~~~~~~~~~~~~~~~^
|
// ~~~~~~~~~~~~~~~~~^
|
||||||
// 1 error generated.
|
// 1 error generated.
|
||||||
#if YY_FLEX_MAJOR_VERSION * 1000 + YY_FLEX_MINOR_VERSION <= 2006 && defined __clang__
|
#if FLEX_VERSION < 206 && defined __clang__
|
||||||
# pragma clang diagnostic ignored "-Wdocumentation"
|
# pragma clang diagnostic ignored "-Wdocumentation"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Old versions of Flex (2.5.35) use 'register'. Warnings introduced in
|
||||||
|
// GCC 7.
|
||||||
|
#if FLEX_VERSION < 206 && defined __GNUC__ && !defined __clang__ && 7 <= __GNUC__
|
||||||
|
# pragma GCC diagnostic ignored "-Wregister"
|
||||||
|
#endif
|
||||||
%@}
|
%@}
|
||||||
@end example
|
@end example
|
||||||
@end ignore
|
@end ignore
|
||||||
|
|||||||
Reference in New Issue
Block a user