summaryrefslogtreecommitdiff
path: root/05/tcc-0.9.27/tests/pp/15.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-02-18 12:36:57 -0500
committerpommicket <pommicket@gmail.com>2022-02-18 12:36:57 -0500
commit826d1afd58c2e064a9c8fdb09eda1b08469de1a8 (patch)
treeb4fedc589a1944f6cf3f451a9db976b431e89b25 /05/tcc-0.9.27/tests/pp/15.c
parentc42c5d94b8944e19cd17a5b540e4c70013c62b92 (diff)
newer version of tcc almost working
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);