================
@@ -85,3 +85,33 @@ void func() {
static const int b; // zero-init-var-warning {{default initialization of an
object of type 'const int' is incompatible with C++}} \
cxx-error {{default initialization of an object of
const type 'const int'}}
}
+
+// Test the behavior of flexible array members. Those cannot be initialized
+// when a stack-allocated object of the structure type is created. We handle
+// degenerate flexible arrays similarly, but only if the array does not
+// actually specify any storage. Note that C++ does not have flexible array
+// members at all, which is why the test is disabled there.
+#ifndef __cplusplus
+struct RealFAM {
----------------
AaronBallman wrote:
That's a good idea, I'll add a test
https://github.com/llvm/llvm-project/pull/140578
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits