From a1c139063b9157c804fd76eedb6a8060726fe0d5 Mon Sep 17 00:00:00 2001 From: seyko Date: Sun, 1 May 2016 05:43:57 +0300 Subject: output space after TOK_PPNUM which followed by '+' or '-' * correct -E output for the case ++ + ++ concatenation do this only for expanded from macro string and only when tcc_state->output_type == TCC_OUTPUT_PREPROCESS --- tests/pp/14.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/pp/14.c (limited to 'tests/pp/14.c') diff --git a/tests/pp/14.c b/tests/pp/14.c new file mode 100644 index 0000000..8611479 --- /dev/null +++ b/tests/pp/14.c @@ -0,0 +1,11 @@ +extern int printf(const char *format, ...); +#define P ++ +#define n(x) x + +int main(void) +{ + int a = 0, b = -1; + int i1 = a P+P b; + printf("i1 = %d\n", i1); + return n(0x1e)n(-1); +} -- cgit v1.3.1