ref: 489d4004127ad5b60f46ddd1c076534c6c583230
parent: 089ee27ee2b410c3cd74d81089e8889a7c891e7e
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat Sep 26 15:21:47 EDT 2015
Add test for predefined cpp macros
--- /dev/null
+++ b/cc1/tests/test026.c
@@ -1,0 +1,37 @@
+
+/*
+name: TEST026
+descritpion: Test of predefined cpp macros
+output:
+F1
+G2 F1 main
+{
+\
+A3 I y
+A5 P p
+ A5 "746573743032362E63 'P :P
+ A3 #I1E :I
+ A3 #I1 :I
+ A3 #I1 :I
+ A3 #I1 :I
+ A3 A3 :I
+}
+*/
+
+#define x(y) (y)
+
+int
+main(void)
+{
+ int y;
+ char *p;
+
+ p = __FILE__;
+ y = __LINE__;
+/* p = __DATE__; __DATE__ generates different value each time */
+ y = __STDC__;
+/* p = __TIME__; __TIME__ generates different value each time */
+ y = __STDC_HOSTED__;
+ y = __SCC__;
+ y = x(1);
+}