OSDN Git Service

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 21db918..36ab0e7 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 cea9352..833ea03 100644 (file)
@@ -3,4 +3,3 @@ failure with operator precedence
 #else
 success
 #endif
-
index 9838cc7..34f0f95 100644 (file)
@@ -15,5 +15,3 @@ failure_3
 #else
 success_3
 #endif
-
-
index 6304155..bf88d44 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