scc

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

commit 287d81cca3ddb6386c8fb4712a46d7e7cb01e7bd
parent a2edadd2f36ac7cd89027252bdc63f459112ec1a
Author: sin <sin@2f30.org>
Date:   Fri, 14 Aug 2015 16:26:20 +0100

Add test for ternary operator

The test is currently failing.

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

diff --git a/cc1/tests/test003.c b/cc1/tests/test003.c @@ -0,0 +1,23 @@ +/* +name: TEST003 +description: Select function to call inside ternary operator +output: +*/ + +int +foo(void) +{ + return 42; +} + +int +bar(void) +{ + return 24; +} + +int +main(void) +{ + return (1 ? foo : bar)(); +}