scc

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

commit 8fca7e95b329d68eb851bc42bedba4c7274f4be5
parent 4f7d9870d96a7c5f536584b96763d0909116644a
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 20 Jan 2023 00:50:27 +0100

tests/cc: Add execute/0220-comma.c

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

diff --git a/tests/cc/execute/0220-comma.c b/tests/cc/execute/0220-comma.c @@ -0,0 +1,21 @@ +int a; + +int +f1() +{ + return a = 2; +} + +int +f2() +{ + return a += 1; +} + +int +main() +{ + if (f1(), f2() != 3) + return 1; + return 0; +} diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst @@ -210,3 +210,4 @@ 0217-lchar.c 0218-initialize.c [TODO] 0219-abbrev.c +0220-comma.c