scc

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

commit c946d13235a8460a8c7f2aa86e705202d77231a7
parent a901b27da57ae3df5a05f29b958104a55a10282b
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 16 Jun 2022 16:46:31 +0200

tests/cc: Add 0208-sizeof.c

Diffstat:
Atests/cc/execute/0208-sizeof.c | 9+++++++++
Mtests/cc/execute/scc-tests.lst | 1+
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tests/cc/execute/0208-sizeof.c b/tests/cc/execute/0208-sizeof.c @@ -0,0 +1,9 @@ +#define LEN(a) sizeof((a))/sizeof((a)[0]) + +int +main(void) +{ + char s[] = "bla"; + + return !(LEN(s) == 4); +} diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst @@ -198,3 +198,4 @@ 0205-cpparg.c 0206-initializer.c 0207-structcb.c +0208-sizeof.c