aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/pp.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-10-15 10:38:19 +0200
committerlemon <lsof@mailbox.org>2025-10-15 10:38:19 +0200
commit08a4e1ef256167ec8c763217a69365385f1da8f2 (patch)
tree2ac3382864311b26555b4c6c359132e67730ba39 /test/pp.c
parentb3f78886ed9ed7e5fc1bd522205e473c3102fc4e (diff)
c: concatenate adjacent string literal tokens
Diffstat (limited to 'test/pp.c')
-rw-r--r--test/pp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/pp.c b/test/pp.c
index 7c34542..51cf70f 100644
--- a/test/pp.c
+++ b/test/pp.c
@@ -7,6 +7,7 @@
#define CATl(a) a##bar
#define CATr(a) foo##a
#define CAT(a,b) a##b
+#define foobar() foo##bar
#define hash_hash # ## #
#define mkstr(a) # a
@@ -21,11 +22,13 @@ main(void)
++foobar;
--CATr(bar);
CAT(foo,bar) += 3;
+ foobar() /=2;
printf("%s %s\n",STR ( ok /1 "\n"n ;.&
05.5), STR(ADD(1,2)));
hi(ADD(Foo, SQR(Bar+1)));
int foo123 = 77;
- printf("%s %s %g\n", str(Foo,5), xstr(Foo), CAT(1.5,e3f) + CAT(7,)-CAT(,1));
+ printf("%s "
+ "%s %g\n", str(Foo,5), xstr(Foo), CAT(1.5,e3f) + CAT(7,)-CAT(,1));
printf("join: \"%s\"\n", p);
CAT(ret,urn) 0;
}