aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoe Soroka <gits@joesoroka.com>2011-07-08 02:51:06 -0700
committerJoe Soroka <gits@joesoroka.com>2011-07-08 02:51:06 -0700
commit38756b506f99454a70402c2589a93e8a9d9d78c6 (patch)
treeb3b3d2d33cc8f55150b9e4e3fedad484a81c722e /tests
parent5cf5871aafa0032ec54fc76b11c06f2217409e46 (diff)
downloadtinycc-38756b506f99454a70402c2589a93e8a9d9d78c6.tar.gz
tinycc-38756b506f99454a70402c2589a93e8a9d9d78c6.tar.bz2
fix self-referential token pasting
Diffstat (limited to 'tests')
-rw-r--r--tests/tcctest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c
index 22f3fdb..980b436 100644
--- a/tests/tcctest.c
+++ b/tests/tcctest.c
@@ -103,6 +103,10 @@ int isid(int c);
#define HIGHLOW "hello"
#define LOW LOW ", world"
+static int onetwothree = 123;
+#define onetwothree4 onetwothree
+#define onetwothree xglue(onetwothree,4)
+
#define min(a, b) ((a) < (b) ? (a) : (b))
#ifdef C99_MACROS
@@ -155,6 +159,8 @@ void macro_test(void)
printf("s4=%s\n", str(a1));
printf("B3=%d\n", B3);
+ printf("onetwothree=%d\n", onetwothree);
+
#ifdef A
printf("A defined\n");
#endif