[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
doc: work around Flex's use of 'register'
From: |
Akim Demaille |
Subject: |
doc: work around Flex's use of 'register' |
Date: |
Sat, 22 Sep 2018 19:42:01 +0200 |
commit 154bc7ddacb3d1ad495a7ecda57fcbfaeb6d4f07
Author: Akim Demaille <address@hidden>
Date: Sat Sep 22 13:57:48 2018 +0200
doc: work around Flex's use of 'register'
The CI uses an old version of Flex.
See 65fa634cdcfc5cf59b8b074670f488bba4df57cd.
* doc/bison.texi (calc++/scanner.ll): Here.
diff --git a/doc/bison.texi b/doc/bison.texi
index 3726854c..e0364b7e 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -11506,9 +11506,13 @@ then the parser's to get the set of defined tokens.
#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"
+// GCC 7 and Clang 6.
+#if FLEX_VERSION < 206
+# if defined __clang__ && 6 <= __clang_major__
+# pragma clang diagnostic ignored "-Wdeprecated-register"
+# elif defined __GNUC__ && 7 <= __GNUC__
+# pragma GCC diagnostic ignored "-Wregister"
+# endif
#endif
address@hidden
@end example