<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/66300>66300</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang] `-Wmissing-field-initializers` incorrectly emits a warning when the last field of the initialized struct is a flexible array
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang,
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ahatanak
      </td>
    </tr>
</table>

<pre>
    $ cat test.c
```
struct S {
  int f0;
  int f1[];
};

typedef struct S S;

S s = {1, {2, 3}};
```

$ clang -c test.c -Wmissing-field-initializers 
test.c:8:17: warning: missing field 'f1' initializer [-Wmissing-field-initializers]
    8 | S s = {1, {2, 3}};
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEUkGPozwM_TXmYlEFBwIcOHSm6h-Yw3cOYCDfplAlYbvdX78KZWY6e5iVUBye4me_Z2vvzTgzN1C8QHFK9BqmxTV60kHP-kfSLv29Acqx0wED-3DoQJxAHEGJ_dt-fXBrF_ANoXx5IIhmDjgIkF-B7FHpA4by6b6d4X7lngf84Hz768EbegR5irUyoNcYKUYZuZ7pvva4n1GM1fOIabcrwvS_i_HezGM6GLZ9amYTjLbmNzuPe1MP7fJYgTxmJcgj3rSbzTzG656OWzoClUMGVOITD0Lx8l2ZaMluE2KFUL7iv2UmfSP7WtY64SZTda5yWReUTM2gZK2zVg1ZmeVlyX1JfVUwS5W1slacmIYESVFnkoiKgg51VdWdzPtsyFtVlTnkgi_a2IO1Py-HxY2J8X7lRikpRGJ1y9ZvS0O0uQkUewOimW-4PY1IcUpcExnSdh095MIaH_wnZzDBbrv34ChOCEp8a5MSaOZucY67YO_IFxM86vdZ4G3iGcPEaLUP-ziWYUM-afr31TIxdbD8y7SWUTun78nqbDOFcPUgj0BnoPNowrS2h265AJ1j63tIr275n7sAdN4Ee6DzZs-fAAAA__-3LP3D">