Implement #if and friends.
authorCarl Worth <cworth@cworth.org>
Wed, 26 May 2010 16:32:57 +0000 (09:32 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 26 May 2010 16:33:23 +0000 (09:33 -0700)
With this change, tests 41 through 49 all pass. (The defined operator
appears to be somehow broken so that test 50 doesn't pass yet.)

glcpp.h
tests/049-if-expression-precedence.c
tests/050-if-defined.c
tests/glcpp-test

diff --git a/glcpp.h b/glcpp.h
index 21db918cdcee578535b8746931237b1e56aee9c1..36ab0e7ca5c104018fef5fc1ed1dfeb1b20b207b 100644 (file)
--- a/glcpp.h
+++ b/glcpp.h
@@ -49,7 +49,7 @@ typedef struct token_list token_list_t;
 
 typedef union YYSTYPE
 {
-       int ival;
+       intmax_t ival;
        char *str;
        string_list_t *string_list;
        token_t *token;
index cea935220fd9f0a89a9e5e353c5a05f935abe56e..833ea03882ac95dd9bd09c4e04f8bafe7e24d30e 100644 (file)
@@ -3,4 +3,3 @@ failure with operator precedence
 #else
 success
 #endif
-
index 9838cc747d5ef269b1d4e72070db8814e8e534f6..34f0f95140eb48be1a8011431ffb1219f2dc2dfd 100644 (file)
@@ -15,5 +15,3 @@ failure_3
 #else
 success_3
 #endif
-
-
index 630415521047841dcab22c8c1e04c69b85c741e5..bf88d4462e192c21f5913fe01e67708500ab99e5 100755 (executable)
@@ -6,5 +6,5 @@ for test in *.c; do
     ../glcpp < $test > $test.out
     gcc -E $test -o $test.gcc
     grep -v '^#' < $test.gcc > $test.expected
-    diff -u $test.expected $test.out
+    diff -B -u $test.expected $test.out
 done