aboutsummaryrefslogtreecommitdiff
path: root/tests/tests2/64_macro_nesting.c
diff options
context:
space:
mode:
authorjiang <30155751@qq.com>2014-04-29 16:05:16 +0800
committerjiang <30155751@qq.com>2014-04-29 16:05:16 +0800
commit2a8905c93b4f67a21e3dbf297c3e93c598831528 (patch)
tree6f7491150cfe01700c9863946906203adad0de13 /tests/tests2/64_macro_nesting.c
parent02e2fe3c260415f4cb1cbcaca9b2403a17f7ff2e (diff)
parente20c1eb99e1003c1e59522c136dbb15c52d7cc7c (diff)
downloadtinycc-2a8905c93b4f67a21e3dbf297c3e93c598831528.tar.gz
tinycc-2a8905c93b4f67a21e3dbf297c3e93c598831528.tar.bz2
So that the generated code, and more short
Diffstat (limited to 'tests/tests2/64_macro_nesting.c')
-rw-r--r--tests/tests2/64_macro_nesting.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/tests2/64_macro_nesting.c b/tests/tests2/64_macro_nesting.c
new file mode 100644
index 0000000..44b582f
--- /dev/null
+++ b/tests/tests2/64_macro_nesting.c
@@ -0,0 +1,10 @@
+#define CAT2(a,b) a##b
+#define CAT(a,b) CAT2(a,b)
+#define AB(x) CAT(x,y)
+
+int main(void)
+{
+ int xy = 42;
+ printf("%d\n", CAT(A,B)(x));
+ return 0;
+}