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/tests2/84-hex-float.c | 12 ++++++++++++ tests/tests2/84-hex-float.expect | 1 + 2 files changed, 13 insertions(+) create mode 100644 tests/tests2/84-hex-float.c create mode 100644 tests/tests2/84-hex-float.expect (limited to 'tests/tests2') diff --git a/tests/tests2/84-hex-float.c b/tests/tests2/84-hex-float.c new file mode 100644 index 0000000..0ef09bf --- /dev/null +++ b/tests/tests2/84-hex-float.c @@ -0,0 +1,12 @@ +extern int printf(const char *format, ...); + +#define ACPI_TYPE_INVALID 0x1E +#define NUM_NS_TYPES ACPI_TYPE_INVALID+1 +int array[NUM_NS_TYPES]; + +#define n 0xe +int main() +{ + printf("n+1 = %d\n", n+1); +// printf("n+1 = %d\n", 0xe+1); +} diff --git a/tests/tests2/84-hex-float.expect b/tests/tests2/84-hex-float.expect new file mode 100644 index 0000000..2175385 --- /dev/null +++ b/tests/tests2/84-hex-float.expect @@ -0,0 +1 @@ +n+1 = 15 -- cgit v1.3.1