On 11/17/2009 04:52 PM, Mark Mitchell wrote:
Joe Buck wrote:
I think that the cleanest way is to suppress the warning for structs
with one member
And recursively?
So that:
struct A { int i; };
struct B { struct A a };
struct C { struct B b };
struct C c = { 1 };
does not trigger the warning?
Sure.
What if struct B is now:
struct B { struct A a; int j; };
and I write:
struct C c = { 1, 2 };
Then warn.
I don't mind changing the behavior to not warn so long as all of the
initializers missing braces apply to the same aggregate. So in the
former case they all apply to struct A, whereas in the later case they
do not.
r~