glcpp: Fix "dangerous trailing context" warning.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 21 Jun 2010 22:15:34 +0000 (15:15 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 23 Jun 2010 21:14:57 +0000 (14:14 -0700)
Flex couldn't be sure whether "def" and "ndef" were part of the #ifdef
and #ifndef patterns or the trailing context of the #if pattern.

glcpp/glcpp-lex.l

index fabe756..afddd7d 100644 (file)
@@ -97,7 +97,7 @@ HEXADECIMAL_INTEGER   0[xX][0-9a-fA-F]+[uU]?
        return HASH_IFNDEF;
 }
 
-{HASH}if/.*\n {
+{HASH}if{HSPACE}/.*\n {
        yyextra->lexing_if = 1;
        yyextra->space_tokens = 0;
        return HASH_IF;