aboutsummaryrefslogtreecommitdiff
path: root/tests/tests2
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2016-05-01 05:43:57 +0300
committerseyko <seyko2@gmail.com>2016-05-01 05:43:57 +0300
commita1c139063b9157c804fd76eedb6a8060726fe0d5 (patch)
tree59ccd96c58dbe63c9244fdf7d957a044a4df5ef9 /tests/tests2
parent256078933c8152038fd0d4fbff1d92b3bb3a14a3 (diff)
downloadtinycc-a1c139063b9157c804fd76eedb6a8060726fe0d5.tar.gz
tinycc-a1c139063b9157c804fd76eedb6a8060726fe0d5.tar.bz2
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
Diffstat (limited to 'tests/tests2')
-rw-r--r--tests/tests2/84-hex-float.c12
-rw-r--r--tests/tests2/84-hex-float.expect1
2 files changed, 13 insertions, 0 deletions
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