Re: [PATCH] range-diff: fix some 'hdr-check' and sparse warnings
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jul 15, 2019, 17:30 UTC
- Message-ID
- <4be7a0a1-0256-40c3-4abc-d3d9302f527b@kdbg.org>
- In-Reply-To
- <20190715144602.GA26636@sigill.intra.peff.net>
Am 15.07.19 um 16:46 schrieb Jeff King:
Show 10 quoted lines
> 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