Jason, Martin.
looking at pr78635, I find it related to Martin's patch of 15-12-2015
dealing with flexible array members.
Martin's patch makes the following ill-formed:
struct Base {int m; char ary[];}; // ends in flexible array - OK
struct Derived : Base {}; // base ends in flexible array - Bad
The testcase fo pr78635 is similar, except that we have an array of Base
objects and are trying to initialize them:
struct Base ary[2] = {{1, 'b'}, {2}};
ISTM that we should reject the type 'Base [<whatever>]', rather than
make the above ill-formed solely because of the initializer. The array
elements must overlap eachother, which I'm sure will break various alias
optimizations, regardless of the initializer question.
I.e. do we want:
struct Base ary[2] = {{1}, {2}};
to be well formed or not? (I'm lobbying for 'no', if that's not clear)
nathan
--
Nathan Sidwell