scc

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

commit 15705a1447f2bcefc6839f272791bf1a78025174
parent 304a60f868d56b3a9fc6925d957526899ae55eb6
Author: Michael Forney <mforney@mforney.org>
Date:   Tue, 26 Mar 2024 00:17:33 -0700

tests/cc: Remove zero-sized array in 0166-desig.c

Empty initializers aren't valid in C before C23, and in C23 they
aren't allowed to initialize arrays with unknown size.

Diffstat:
Mtests/cc/execute/0166-desig.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/cc/execute/0166-desig.c b/tests/cc/execute/0166-desig.c @@ -9,10 +9,8 @@ struct S { .d = {[0] = 4, [1] = 6} }; -char m[] = {}; - int main(void) { - return sizeof(m) == s.d[2]; + return 0 == s.d[2]; }