aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/tccpp.c b/tccpp.c
index dfdee50..2da65cd 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -2910,32 +2910,8 @@ static inline int *macro_twosharps(const int *macro_str)
}
}
if (tok != TOK_NOSUBST) {
- const int *oldptr;
- CValue cval;
-
- /* Check if a space need to be added after ## concatenation in
- order to avoid misinterpreting the newly formed token
- followed by the next token as being a single token (see
- macro_concat test) */
- cstr_new(&cstr);
- cstr_cat(&cstr, get_tok_str(tok, &tokc));
- oldptr = ptr;
- TOK_GET(&t, &ptr, &cval);
- ptr = oldptr;
- cstr_cat(&cstr, get_tok_str(t, &cval));
- cstr_ccat(&cstr, '\0');
- t = tok;
- cval = tokc;
- tcc_open_bf(tcc_state, ":paste:", cstr.size);
- memcpy(file->buffer, cstr.data, cstr.size);
- next_nomacro1();
- if (!*file->buf_ptr) {
- tok_str_add2(&macro_str1, t, &cval);
- tok = ' ';
- }
- tcc_close();
- cstr_free(&cstr);
-
+ tok_str_add2(&macro_str1, tok, &tokc);
+ tok = ' ';
start_of_nosubsts = -1;
}
tok_str_add2(&macro_str1, tok, &tokc);