Unified · Split
| @@ -123,6 +123,12 @@ int isid(int c); · 122 unmodified lines | |||
| 123 | #define __INT64_C(c) c ## LL | 123 | #define __INT64_C(c) c ## LL |
| 124 | #define INT64_MIN (-__INT64_C(9223372036854775807)-1) | 124 | #define INT64_MIN (-__INT64_C(9223372036854775807)-1) |
| 125 | 125 | ||
| 126 | int qq(int x) | ||
| 127 | { | ||
| 128 | return x + 40; | ||
| 129 | } | ||
| 130 | #define qq(x) x | ||
| 131 | |||
| 126 | void macro_test(void) | 132 | void macro_test(void) |
| 127 | { | 133 | { |
| 128 | printf("macro:\n"); | 134 | printf("macro:\n"); |
| @@ -210,7 +216,7 @@ void macro_test(void) · 81 unmodified lines | |||
| 210 | #line 203 "test" | 216 | #line 203 "test" |
| 211 | printf("__LINE__=%d __FILE__=%s\n", | 217 | printf("__LINE__=%d __FILE__=%s\n", |
| 212 | __LINE__, __FILE__); | 218 | __LINE__, __FILE__); |
| 213 | #line 213 "tcctest.c" | 219 | #line 220 "tcctest.c" |
| 214 | 220 | ||
| 215 | /* not strictly preprocessor, but we test it there */ | 221 | /* not strictly preprocessor, but we test it there */ |
| 216 | #ifdef C99_MACROS | 222 | #ifdef C99_MACROS |
| @@ -244,6 +250,9 @@ void macro_test(void) · 27 unmodified lines | |||
| 244 | MF_s("hi"); | 250 | MF_s("hi"); |
| 245 | MF_t("hi"); | 251 | MF_t("hi"); |
| 246 | 252 | ||
| 253 | /* test macro substituion inside args (should not eat stream) */ | ||
| 254 | printf("qq=%d\n", qq(qq)(2)); | ||
| 255 | |||
| 247 | /* comment with stray handling *\ | 256 | /* comment with stray handling *\ |
| 248 | / | 257 | / |
| 249 | /* this is a valid *\/ comment */ | 258 | /* this is a valid *\/ comment */ |