Am 15.07.19 um 16:46 schrieb Jeff King:
> On Sun, Jul 14, 2019 at 10:30:27AM +0200, Johannes Sixt wrote:
>>> But it does fall down
>>> when the first element _has_ to be a struct (like, say, any user of our
>>> hashmap.[ch] interface).
>>
>> No, it does not. It is not necessary to spell out nested structs in the
>> initializer.
> 
> Ah, that is news to me. I know that this compiles OK with "gcc -Wall",
> but is it guaranteed by the standard?

Yes; see http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf,
6.7.8 ยง20, in particular, the sentence beginning with "Otherwise".

-- Hannes

Reply via email to