Allow fewer initializer values in initializer expr lists than expected.
We now match C's behavior, where if we have an initializer list with too-few values for the underlying type, any additional elements are initialized to zero. Fixes issue #123.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
// Initializer list for array "int32[4]" must have 4 elements (has 3)
|
||||
// Initializer list for array "int32[2][4]" must have no more than 2 elements (has 3)
|
||||
|
||||
int a[2][4] = { { 1, 2, 3 }, { 1, 2, 3, 4 }, 1 };
|
||||
|
||||
Reference in New Issue
Block a user