On Wed, 11 Mar 2015, Vincent Lefevre wrote: > BTW, the following is forbidden (and makes no sense), but is accepted > by GCC without a warning: > > int foo (void) > { > union { char a[8]; int b; } u = { .a = { 0 }, .b = 1 }; > return u.b; > }
What constraint do you think forbids it? It looks like an ordinary case of overriding with designated initializers. -- Joseph S. Myers jos...@codesourcery.com