[PATCH] D123649: Allow flexible array initialization in C++.

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 22 13:59:33 PDT 2023


ahatanak added a comment.

The assertion also fails when the following code is compiled:

  struct S { int i[]; };
  S value{0};

According to C99, flexible array members have to belong to structs that have more than one named member. But clang allows that as a GNU extension although gcc seems to reject it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123649/new/

https://reviews.llvm.org/D123649



More information about the cfe-commits mailing list