Home
       tests/cc: Remove zero-sized array in 0166-desig.c - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 15705a1447f2bcefc6839f272791bf1a78025174
   DIR parent 304a60f868d56b3a9fc6925d957526899ae55eb6
  HTML 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:
         M tests/cc/execute/0166-desig.c       |       4 +---
       
       1 file changed, 1 insertion(+), 3 deletions(-)
       ---
   DIR 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];
        }