================
@@ -121,10 +150,14 @@ void test_typedefs() {
static_assert(_Countof(*x) == 12);
}
-void test_zero_size_arrays() {
+void test_zero_size_arrays(int n) {
int array[0]; // expected-warning {{zero size arrays are an extension}}
static_assert(_Countof(array) == 0);
static_assert(_Countof(int[0]) == 0); // expected-warning {{zero size arrays
are an extension}}
+ int multi_array[0][n]; // expected-warning {{zero size arrays are an
extension}}
----------------
AaronBallman wrote:
Note, currently we don't issue a zero-sized array extension warning for this
case: https://godbolt.org/z/78W8cr9o5 (seems like a preexisting bug)
https://github.com/llvm/llvm-project/pull/133333
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits