<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/99725>99725</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
`-Wvla-cxx-extension` does not produce an error with `-Wall -pedantic-errors`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zygoloid
</td>
</tr>
</table>
<pre>
Testcase:
```c++
int f();
void g() {
int arr[f()];
}
```
Compiling this invalid code in C++ mode with `-Wall -pedantic-errors` should give an error. But it doesn't, it just produces a warning.
It seems that the fact that `-Wvla-cxx-extension` is in `-Wall` is breaking `-pedantic-errors`. Replacing `-pedantic-errors` with `-Werror=pedantic` works properly, which is odd since `-pedantic-errors` is supposed to imply `-Werror=pedantic`.
(Including this warning in `-Wall` seems like a strange choice; it's not in GCC's `-Wall` and doesn't seem like the kind of thing that `-Wall` usually warns about.)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVMGO4ygQ_Rp8KcUi2I7bBx8mibKa62qlPWOo2EwIWBROd_brV9hOurdX0UgoUT2qivdegSWR6R1iy6o9q46ZnOLgQ_vPvffWG511Xt_bv5CikoSs-MH4kfEfbMeXpZjYpzWjxkU4M_HGRMOKFbt5o6FfQGD1igKkXBkCq_aPiur4LGL18ds5S3jw19FY43qIgyEw7iat0aC8RjAODgsZuKb43cQB2I5v_pbWwmZELV00aoMh-EBsx4EGP1kNvbkhSAfzRg77KYKJoD2SY6KOTBxS_GuiCGPwelJIIOFdBmdcn68859-fEQjxShAHGSEOCGep4hLNTG5WbtTHxwY_Ijoy3iUas5An0xXpAspLEprw_3PP4U8crVSvM77onzFWHB9J864PF0p6Rgz2njS-D0YN6WivNZBxCl91NgQ0jaMn1BA9mOto7y9P-o9BTLz9dMpO-jnC1cbvDiw2WnNBkEAxSNcjqMEbhazYg4lM1ATOx1T4x-Ewh18bSKc_Rzi3W7qloVyM0-DPicBM4zGdtXSiSVp7n6kRyM5PMWeiyXRb6KZoZIbtthbbsiiaN5ENrS4b3lWq2J4LUfBSa10VWG5327qsCim7zLSCi5LXgnPOd0LkvOt2lW50XVfVmaNiJcerNDa39nbNfegzQzRh2zS1qDIrO7T0eJ-hTUmbbuqJldwaivRZFk202L6-asmR2bX1Ij-v_e9fSzYF2w4xjpQ-AuLExKk3cZi6XPkrE6fEYf3bjMH_QhWZOM06iInTIuXWin8DAAD__-EBZnw">