summaryrefslogtreecommitdiff
path: root/05/tcc-0.9.27/tests/pp/15.c
diff options
context:
space:
mode:
Diffstat (limited to '05/tcc-0.9.27/tests/pp/15.c')
-rw-r--r--05/tcc-0.9.27/tests/pp/15.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/05/tcc-0.9.27/tests/pp/15.c b/05/tcc-0.9.27/tests/pp/15.c
new file mode 100644
index 0000000..cf13f9a
--- /dev/null
+++ b/05/tcc-0.9.27/tests/pp/15.c
@@ -0,0 +1,18 @@
+// insert a space between two tokens if otherwise they
+// would form a single token when read back
+
+#define n(x) x
+
+return (n(long)n(double))d;
+return n(A)n(++)n(+)n(B);
+return n(A)n(+)n(++)n(B);
+return n(A)n(++)n(+)n(+)n(B);
+
+// not a hex float
+return n(0x1E)n(-1);
+
+// unlike gcc but correct
+// XXX: return n(x)+n(x)-n(1)+n(1)-2;
+
+// unlike gcc, but cannot appear in valid C
+// XXX: return n(x)n(x)n(1)n(2)n(x);