[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

Nick Desaulniers via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 8 10:26:58 PST 2024


nickdesaulniers wrote:

> I didn't do this because it seemed like this would change a lot of existing test cases

Can you give some examples of tests that would fail? If we have tests checking that these fail, then perhaps those tests should add `-Werror=pedantic` so that they can continue to fail.

Weirder, clang and msvc already support this, but only in C++ mode!  msvc supports this in C mode! GCC does not support this in either!

C++ mode: https://godbolt.org/z/esjnE7bnY
C mode: https://godbolt.org/z/hGE9dhjE1


https://github.com/llvm/llvm-project/pull/84428


More information about the cfe-commits mailing list