diff options
author | Carl Worth <cworth@cworth.org> | 2010-05-26 09:32:57 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-05-26 09:33:23 -0700 |
commit | f6914fd37b2b66d7be1ba0c31450d89d1785ccce (patch) | |
tree | fa6636662a63e2675a5173e772ac253016fa8fe8 | |
parent | 8fed1cddae8b024972d0c08f120bfd0292cb9cca (diff) |
Implement #if and friends.
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.)
-rw-r--r-- | glcpp.h | 2 | ||||
-rw-r--r-- | tests/049-if-expression-precedence.c | 1 | ||||
-rw-r--r-- | tests/050-if-defined.c | 2 | ||||
-rwxr-xr-x | tests/glcpp-test | 2 |
4 files changed, 2 insertions, 5 deletions
@@ -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; diff --git a/tests/049-if-expression-precedence.c b/tests/049-if-expression-precedence.c index cea9352..833ea03 100644 --- a/tests/049-if-expression-precedence.c +++ b/tests/049-if-expression-precedence.c @@ -3,4 +3,3 @@ failure with operator precedence #else success #endif - diff --git a/tests/050-if-defined.c b/tests/050-if-defined.c index 9838cc7..34f0f95 100644 --- a/tests/050-if-defined.c +++ b/tests/050-if-defined.c @@ -15,5 +15,3 @@ failure_3 #else success_3 #endif - - diff --git a/tests/glcpp-test b/tests/glcpp-test index 6304155..bf88d44 100755 --- a/tests/glcpp-test +++ b/tests/glcpp-test @@ -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 |