inclyc added inline comments.
================ Comment at: clang/test/Sema/warn-vla.c:8-12 +void test2(int n, int v[n]) { // c99 no-warning +#if __STDC_VERSION__ < 199901L +// expected-warning@-2{{variable length arrays are a C99 feature}} +#endif } ---------------- aaron.ballman wrote: > The diagnostic there is rather unfortunate because we're not using a > variable-length array in this case. Emm, I'm not clear about whether we should consider this a VLA, and generates `-Wvla-extensions`. Is `v[n]` literally a variable-length array? (in source code) So it seems to me that we should still report c89 incompatibility warnings? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132952/new/ https://reviews.llvm.org/D132952 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits