commit 489d4004127ad5b60f46ddd1c076534c6c583230 parent 089ee27ee2b410c3cd74d81089e8889a7c891e7e Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Sat, 26 Sep 2015 19:21:47 +0200 Add test for predefined cpp macros Diffstat:
A | cc1/tests/test026.c | | | 37 | +++++++++++++++++++++++++++++++++++++ |
1 file changed, 37 insertions(+), 0 deletions(-)
diff --git a/cc1/tests/test026.c b/cc1/tests/test026.c @@ -0,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); +}