The following minor and stylistic changes might be a nice addition, if we are to consider that YY_FLEX_MINOR_VERSION will always be defined.
commit a0ae2d1bdd18ec2174bd849362c9b4238af40713 Author: Theophile Ranquet <[email protected]> Date: Thu Dec 6 13:21:36 2012 +0100 cpp: improve the Flex version checking macro * src/flex-scanner.h (FLEX_VERSION): Here. diff --git a/src/flex-scanner.h b/src/flex-scanner.h index 028082e..dbb01db 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);
