| @@ -1508,6 +1508,7 @@ ST_FUNC void parse_define(void) · 1507 unmodified lines |
| 1508 | 1508 | if (1 == spc) |
| 1509 | 1509 | --tokstr_buf.len; |
| 1510 | 1510 | spc = 3; |
| 1511 | + tok = TOK_PPJOIN; |
| 1511 | 1512 | } else if ('#' == tok) { |
| 1512 | 1513 | spc = 4; |
| 1513 | 1514 | } else if (check_space(tok, &spc)) { |
| @@ -2958,10 +2959,10 @@ static int *macro_arg_subst(Sym **nested_list, const int *macro_str, Sym *args) · 1444 unmodified lines |
| 2958 | 2959 | int l0 = str.len; |
| 2959 | 2960 | st = s->d; |
| 2960 | 2961 | /* if '##' is present before or after, no arg substitution */ |
| 2961 | | − if (*macro_str == TOK_TWOSHARPS || t1 == TOK_TWOSHARPS) { |
| 2962 | + if (*macro_str == TOK_PPJOIN || t1 == TOK_PPJOIN) { |
| 2962 | 2963 | /* special case for var arg macros : ## eats the ',' |
| 2963 | 2964 | if empty VA_ARGS variable. */ |
| 2964 | | − if (t1 == TOK_TWOSHARPS && t0 == ',' && gnu_ext && s->type.t) { |
| 2965 | + if (t1 == TOK_PPJOIN && t0 == ',' && gnu_ext && s->type.t) { |
| 2965 | 2966 | if (*st == 0) { |
| 2966 | 2967 | /* suppress ',' '##' */ |
| 2967 | 2968 | str.len -= 2; |
| @@ -3277,7 +3278,7 @@ static inline int *macro_twosharps(const int *ptr0) · 309 unmodified lines |
| 3277 | 3278 | /* we search the first '##' */ |
| 3278 | 3279 | for (ptr = ptr0;;) { |
| 3279 | 3280 | TOK_GET(&t, &ptr, &cval); |
| 3280 | | − if (t == TOK_TWOSHARPS) |
| 3281 | + if (t == TOK_PPJOIN) |
| 3281 | 3282 | break; |
| 3282 | 3283 | if (t == 0) |
| 3283 | 3284 | return NULL; |
| @@ -3290,9 +3291,9 @@ static inline int *macro_twosharps(const int *ptr0) · 6 unmodified lines |
| 3290 | 3291 | TOK_GET(&t, &ptr, &cval); |
| 3291 | 3292 | if (t == 0) |
| 3292 | 3293 | break; |
| 3293 | | − if (t == TOK_TWOSHARPS) |
| 3294 | + if (t == TOK_PPJOIN) |
| 3294 | 3295 | continue; |
| 3295 | | − while (*ptr == TOK_TWOSHARPS) { |
| 3296 | + while (*ptr == TOK_PPJOIN) { |
| 3296 | 3297 | int t1; CValue cv1; |
| 3297 | 3298 | /* given 'a##b', remove nosubsts preceding 'a' */ |
| 3298 | 3299 | if (start_of_nosubsts >= 0) |
| @@ -3300,7 +3301,7 @@ static inline int *macro_twosharps(const int *ptr0) · 1 unmodified line |
| 3300 | 3301 | /* given 'a##b', remove nosubsts preceding 'b' */ |
| 3301 | 3302 | while ((t1 = *++ptr) == TOK_NOSUBST) |
| 3302 | 3303 | ; |
| 3303 | | − if (t1 && t1 != TOK_TWOSHARPS) { |
| 3304 | + if (t1 && t1 != TOK_PPJOIN) { |
| 3304 | 3305 | TOK_GET(&t1, &ptr, &cv1); |
| 3305 | 3306 | if (t != TOK_PLCHLDR || t1 != TOK_PLCHLDR) { |
| 3306 | 3307 | if (paste_tokens(t, &cval, t1, &cv1)) { |
| @@ -3346,7 +3347,7 @@ static void macro_subst( · 39 unmodified lines |
| 3346 | 3347 | spc = nosubst = 0; |
| 3347 | 3348 | |
| 3348 | 3349 | /* first scan for '##' operator handling */ |
| 3349 | | − if (can_read_stream & 1) { |
| 3350 | + if (can_read_stream) { |
| 3350 | 3351 | macro_str1 = macro_twosharps(ptr); |
| 3351 | 3352 | if (macro_str1) |
| 3352 | 3353 | ptr = macro_str1; |