From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 8486A1F461 for ; Mon, 15 Jul 2019 17:30:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732093AbfGORaV (ORCPT ); Mon, 15 Jul 2019 13:30:21 -0400 Received: from bsmtp7.bon.at ([213.33.87.19]:61521 "EHLO bsmtp7.bon.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732032AbfGORaN (ORCPT ); Mon, 15 Jul 2019 13:30:13 -0400 Received: from dx.site (unknown [93.83.142.38]) by bsmtp7.bon.at (Postfix) with ESMTPSA id 45nVsZ4Mw7z5tl9; Mon, 15 Jul 2019 19:30:10 +0200 (CEST) Received: from [IPv6:::1] (localhost [IPv6:::1]) by dx.site (Postfix) with ESMTP id E4759F9B; Mon, 15 Jul 2019 19:30:09 +0200 (CEST) Subject: Re: [PATCH] range-diff: fix some 'hdr-check' and sparse warnings To: Jeff King Cc: Carlo Arenas , Junio C Hamano , Ramsay Jones , Thomas Gummerer , GIT Mailing-list References: <41a60e60-d2c0-7d54-5456-e44d106548a4@kdbg.org> <20190714005129.GA4525@sigill.intra.peff.net> <54c2ee44-ee99-ea4a-3154-f642e0060877@kdbg.org> <20190715144602.GA26636@sigill.intra.peff.net> From: Johannes Sixt Message-ID: <4be7a0a1-0256-40c3-4abc-d3d9302f527b@kdbg.org> Date: Mon, 15 Jul 2019 19:30:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190715144602.GA26636@sigill.intra.peff.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org 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