[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 11 10:14:47 PDT 2024
erichkeane wrote:
> > C23 6.7.3.2p20: "As a special case, the last member of a structure with more than one named member may have an incomplete array type; this is called a flexible array member. ..."
>
> Thanks! Yeah, I wonder if that could have been "of a structure _or union_ " (as in was that an intentional or unintentional omission)?
I'd assume it was a particularly intentional omission. The semantics (particularly in the abstract machine) of this in a union is particularly difficult to reason about.
https://github.com/llvm/llvm-project/pull/84428
More information about the cfe-commits
mailing list