[PATCH] D18823: Implementation of VlA of GNU C++ extension
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 11 14:19:27 PDT 2016
rsmith added inline comments.
================
Comment at: llvm/tools/clang/lib/Sema/SemaType.cpp:2158-2159
@@ -2157,3 +2157,4 @@
if (!getLangOpts().C99) {
- if (T->isVariableArrayType()) {
+ if (T->isVariableArrayType() &&
+ !(getLangOpts().CPlusPlus && getLangOpts().GNUMode)) {
// Prohibit the use of non-POD types in VLAs.
----------------
This isn't right; this is *not* a GNU C++ extension. GCC rejects it with -pedantic-errors in GNU and non-GNU mode, and accepts it by default in GNU and non-GNU mode.
What you need to do is to delete the check for a POD element type below, since that is the new feature you're adding support for.
Then please revert all of your test changes other than the new file.
http://reviews.llvm.org/D18823
More information about the cfe-commits
mailing list