summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheophile Ranquet <ranquet@lrde.epita.fr>2012-12-06 13:21:36 +0100
committerTheophile Ranquet <ranquet@lrde.epita.fr>2012-12-07 12:02:00 +0100
commitc49e2f153521a86f22b2631ca8a1fb6389c3a70e (patch)
tree219c0b8402405eb30c0bf0174d3331f22ad2b8c1
parentdbda56040076e602f3494c5499a50d0452b162b5 (diff)
downloadbison-c49e2f153521a86f22b2631ca8a1fb6389c3a70e.tar.gz
cpp: improve the Flex version checking macro
* src/flex-scanner.h (FLEX_VERSION): Here.
-rw-r--r--src/flex-scanner.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/flex-scanner.h b/src/flex-scanner.h
index 028082ec..dbb01dbd 100644
--- a/src/flex-scanner.h
+++ b/src/flex-scanner.h
@@ -21,18 +21,18 @@
# error "FLEX_PREFIX not defined"
#endif
-/* Whether this version of Flex is (strictly) greater than
- Major.Minor.Subminor. */
+/* Flex full version as a number. */
#ifdef YY_FLEX_SUBMINOR_VERSION
-# define FLEX_VERSION \
- (YY_FLEX_MAJOR_VERSION) * 1000000 \
-+ (YY_FLEX_MINOR_VERSION) * 1000 \
-+ (YY_FLEX_SUBMINOR_VERSION)
+# define FLEX_VERSION \
+ ((YY_FLEX_MAJOR_VERSION) * 1000000 \
+ + (YY_FLEX_MINOR_VERSION) * 1000 \
+ + (YY_FLEX_SUBMINOR_VERSION))
#else
-# define FLEX_VERSION \
- (YY_FLEX_MAJOR_VERSION) * 1000000 \
-+ (YY_FLEX_MINOR_VERSION) * 1000
+# define FLEX_VERSION \
+ ((YY_FLEX_MAJOR_VERSION) * 1000000 \
+ + (YY_FLEX_MINOR_VERSION) * 1000)
#endif
+
/* Pacify "gcc -Wmissing-prototypes" when flex 2.5.31 is used. */
# if FLEX_VERSION <= 2005031
int FLEX_PREFIX (get_lineno) (void);