Unified · Split
| @@ -123,6 +123,12 @@ int isid(int c); · 122 unmodified lines | ||
| 123 | 123 | #define __INT64_C(c) c ## LL |
| 124 | 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 | 132 | void macro_test(void) |
| 127 | 133 | { |
| 128 | 134 | printf("macro:\n"); |
| @@ -210,7 +216,7 @@ void macro_test(void) · 81 unmodified lines | ||
| 210 | 216 | #line 203 "test" |
| 211 | 217 | printf("__LINE__=%d __FILE__=%s\n", |
| 212 | 218 | __LINE__, __FILE__); |
| 213 | −#line 213 "tcctest.c" | |
| 219 | +#line 220 "tcctest.c" | |
| 214 | 220 | |
| 215 | 221 | /* not strictly preprocessor, but we test it there */ |
| 216 | 222 | #ifdef C99_MACROS |
| @@ -244,6 +250,9 @@ void macro_test(void) · 27 unmodified lines | ||
| 244 | 250 | MF_s("hi"); |
| 245 | 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 | 256 | /* comment with stray handling *\ |
| 248 | 257 | / |
| 249 | 258 | /* this is a valid *\/ comment */ |