ref: 2e7e4ca6b9def1b7bae6b93285f6431039f9656a
parent: 52bfbad097a91a532b8ebcc70462151d30c8d364
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Mar 22 05:58:15 EDT 2022
tests/cc: Add test 0201-cpp.c
--- /dev/null
+++ b/tests/cc/execute/0201-cpp.c
@@ -1,0 +1,26 @@
+/* taken from ISO/IEC 9899:1999 Section 6.10.3.5 p7 */
+
+#define t(x,y,z) x ## y ## z
+
+int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,),
+ t(10,,), t(,11,), t(,,12), t(,,) };
+
+int
+main()
+{
+ if (j[0] != 123)
+ return 1;
+ if (j[1] != 45)
+ return 2;
+ if (j[2] != 67)
+ return 3;
+ if (j[3] != 89)
+ return 4;
+ if (j[4] != 10)
+ return 5;
+ if (j[5] != 11)
+ return 6;
+ if (j[6] != 12)
+ return 7;
+ return 0;
+}
--- a/tests/cc/execute/scc-tests.lst
+++ b/tests/cc/execute/scc-tests.lst
@@ -191,3 +191,4 @@
0198-nullcpp.c
0199-voidpcast.c [TODO]
0200-cpp.c [TODO]
+0201-cpp.c [TODO]