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.)
This commit is contained in:
Carl Worth
2010-05-26 09:32:57 -07:00
parent 8fed1cddae
commit f6914fd37b
4 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -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;
-1
View File
@@ -3,4 +3,3 @@ failure with operator precedence
#else
success
#endif
-2
View File
@@ -15,5 +15,3 @@ failure_3
#else
success_3
#endif
+1 -1
View File
@@ -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