scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 381c1e6e6c6ab8e7bbce6b8bd6c99e66061acc8b
parent 0310c25228215877652d65d6c7d64e3dafa15d24
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 23 Mar 2023 19:46:14 +0100

test/cc: Add execute/0226-pointer.c

Diffstat:
Atests/cc/execute/0226-pointer.c | 21+++++++++++++++++++++
Mtests/cc/execute/scc-tests.lst | 1+
2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/tests/cc/execute/0226-pointer.c b/tests/cc/execute/0226-pointer.c @@ -0,0 +1,21 @@ +char * +f1() +{ + return 1,2,3, (void *) 0; +} + +char * +f2() +{ + return 1,2,3, 0 ? "" : 0; +} + +int +main() +{ + if (f1()) + return 1; + if (f2()) + return 2; + return 0; +} diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst @@ -216,3 +216,4 @@ 0223-macro.c 0224-macro.c 0225-func.c +0226-pointer.c