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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 26 19:23:03 PDT 2024


https://github.com/efriedma-quic approved this pull request.

LGTM

The one thing I'm worried about here is the possibility that a future C standard version standardizes a similar extension, but with different semantics (since we're not using any reserved keywords here).  Like I mentioned before, that's very unlikely to happen for non-zero-size unions, but zero-size types are a completely unexplored space in the standard.

But I guess if that happens, we can come with some sort of transition plan using attributes.  And I don't have any specific idea of what the standards committee might choose to do differently, so maybe it's not that likely.

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


More information about the cfe-commits mailing list