scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit e71640c89e83818cd86e00ed63e0db88ec70feb8
parent e172a54f741c15f19a7a9df39c75a301ab784a80
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon,  5 Oct 2015 16:58:33 +0200

Add basic test for defined() in #if

Diffstat:
Acc1/tests/test033.c | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/cc1/tests/test033.c b/cc1/tests/test033.c @@ -0,0 +1,17 @@ +/* +name: TEST033 +description: test for #if defined() +output: +G1 I c +*/ + +#if defined(FOO) +int a; +#elif !defined(FOO) && defined(BAR) +int b; +#elif !defined(FOO) && !defined(BAR) +int c; +#else +int d; +#endif +