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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 8371E1F403 for ; Fri, 7 Oct 2022 21:35:27 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="oEKSPsD/"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229672AbiJGVd7 (ORCPT ); Fri, 7 Oct 2022 17:33:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229873AbiJGVdj (ORCPT ); Fri, 7 Oct 2022 17:33:39 -0400 Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B97E511C270 for ; Fri, 7 Oct 2022 14:33:38 -0700 (PDT) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 5B32B1A6B77; Fri, 7 Oct 2022 17:33:38 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=oBv9ZhHYC0Xak1Mg8S67+SmRtrIM1Ks/BdPyrl teMH0=; b=oEKSPsD/bjqd7HDkUIgDw1Zfa3ppOaLUY7kn6+vgYGwABK1/IuVlx8 3aGWkE6HpiYOREcwVoo8BjGBTWa0DOLPSjdp25MwuregxestYeoNpqD3Gs1PuT6H ElH+Fjc+Dc+2MQZpSIK56OmgbTZyaez9fAuxYavcM1+sZWvF9m0Xw= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 5289C1A6B75; Fri, 7 Oct 2022 17:33:38 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.5.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 87C0A1A6B72; Fri, 7 Oct 2022 17:33:35 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jeff Hostetler Cc: =?utf-8?Q?Ren=C3=A9?= Scharfe , Jeff Hostetler via GitGitGadget , git@vger.kernel.org, Jeff Hostetler Subject: Re: [PATCH 0/2] Fix syntax errors under clang 11.0.0 on MacOS References: <0f67ca77-f17f-d844-e689-ca9a9bdf7993@jeffhostetler.com> <58d3ef47-2196-4f59-692a-fc86dfbc1252@jeffhostetler.com> Date: Fri, 07 Oct 2022 14:33:34 -0700 In-Reply-To: <58d3ef47-2196-4f59-692a-fc86dfbc1252@jeffhostetler.com> (Jeff Hostetler's message of "Fri, 7 Oct 2022 16:56:01 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: B2FB83B6-4687-11ED-AC2B-B31D44D1D7AA-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Jeff Hostetler writes: > So if I understand you correctly, Apple clang 11 is broken > and Apple clang 12 is good. > > I was getting ready to send (as soon as the CI finished) > the following a simple to add the -Wno... for clang 11 and > below on Darwin. > > +ifeq ($(uname_S),Darwin) > +# Older versions of Apple clang complain about initializing a > +# struct-within-a-struct using just "{0}" rather than "{{0}}". > +# More recent versions do not. This error is considered a > +# false-positive and not worth fixing, so just disable it. > +ifeq ($(filter clang12,$(COMPILER_FEATURES)),) > +DEVELOPER_CFLAGS += -Wno-missing-braces > +endif > +endif > > I'm not sure I understand all of what your suggestion does. I do agree that one is dense, but aims for the same thing, and a bit more. It might be easier to read if written in longhand, but ... ifeq ($(uname_s),Darwin) ifeq ($(filter clang12,$(COMPILER_FEATURES)),) DEVELOPER_CFLAGS += -Wno-missing-braces endif else ifeq ($(filter clang9,$(COMPILER_FEATURES)),) DEVELOPER_CFLAGS += -Wno-missing-braces endif endif ... we'd need to repeat ourselves, so...