<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/117559>117559</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Wrong warning of -Wgnu-variable-sized-type-not-at-end
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Snape3058
</td>
</tr>
</table>
<pre>
```c
struct Wrappee {int b;int a[];};
struct A {
struct B {
struct Wrappee data; // <--- Correct warning here.
int plug;
} x; // <--- Incorrect warning here.
int plug;
};
```
The warning on field `x` is incorrect, as the `plug` in B makes it not a flexible array.
Cross-checked with GCC: https://godbolt.org/z/WWcvdG5Wd
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyskk9v6yoQxT_NeDNyhCHE8cKLJJWrt35PyhrDxOaVgAU4_fPpr-ykrVTdu7uWZRBwfmc4HpWSHTxRC_II8qlQcx5DbP_1aiLB5L7og3lvYcfurwZ2SDnOOuM5qmkiQqiP1mfsQayjuoNAHKFev1-Cw3IU_9ID7IAP7nHlLguI-KM4o7ICcUQE3gHvEMSpLEs8hRhJZ3xV0Vs_4EiRNg_CconJzcMiW5egfsK330D-8fqPmB-QexTr7DPJZc4O_430pQ4eL5acQdixN9gxtAntpwfwE6qEeaRle0UvJzwe8apeKKHN6ENGhRdHb7Z3hCpG9b65-5xiSKnUI-kXMvhq84jPpxOIA445TwnE4X63IZg-uLwJcQDefQDvzmd9M8_ybArTCtOIRhXUVrXgciv4ThZjq5WoeK_2XMu9YhfVyGZvzEXXWjZa16awLWd8W1VcVlvGZLPZk-A7xSrSase3hsGW0VVZt3Hudl28C5vSTG1V1VI2hVM9ubR2KOeeXnHdBc6Xho3tIir7eUiwZc6mnL4x2WZH7TkGP3zHfMHyPPi5vKloVe-oTPaDTJnfJyp9yKXKJXlTzNG1P8KxeZz7jQ5X4N3i8RjKKYb_13_UrZUl4N2j9FvLfwUAAP__YWv-1Q">