scc

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

commit 6cd254e0d1efc6dd85c8c4e9c8e1fcea136553d1
parent 880646d342382410b94216407768f222f2da7847
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 11 Nov 2021 08:09:12 +0100

tests/cc: Fix 0169-string.c

The size of the array was too small for the initializer.

Diffstat:
Atests/cc/error/0025-bad-init.c | 7+++++++
Mtests/cc/execute/0169-string.c | 2+-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/cc/error/0025-bad-init.c b/tests/cc/error/0025-bad-init.c @@ -0,0 +1,7 @@ +char s2[2] = "foo"; + +int +main() +{ + return 0; +} diff --git a/tests/cc/execute/0169-string.c b/tests/cc/execute/0169-string.c @@ -1,6 +1,6 @@ char s0[] = "foo"; char s1[7] = "foo"; -char s2[2] = "foo"; +char s2[3] = "foo"; char s3[] = {"foo"}; char *p = "foo";