Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2675559pxm; Mon, 28 Feb 2022 04:06:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWiPCnbOpFDvT0731jfV+OsSqbXRnrmFOOqu9FnrjOiiebGdusNi0R1nHE/dUl6jXdrLeM X-Received: by 2002:aa7:874b:0:b0:4df:808f:2a1d with SMTP id g11-20020aa7874b000000b004df808f2a1dmr21279166pfo.68.1646049999583; Mon, 28 Feb 2022 04:06:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646049999; cv=none; d=google.com; s=arc-20160816; b=BnyfJ5J3riSereRIw6pfc2io6AC91ZU1dIDJ0F+WGAxPIxQ1k+Khs1Ty5Kk5s7HL1H BKhDlVWxaYMpuHC9GYozWPsNwG6QhLZGchvIzE7UCNueegVwBp5pQ+wnpNBEmwEd2A0j +rCyHR31F/xTZATBskp5Gkqdu50WlrIKcpH5FoBGr7v6NqnWmgESj06kQu85G+FgOZyY K7mFppTgkfpV/j3RB8yVPKkfht8iqCAGLRC+1f8Z04xg6eNBTgN2LCQrpBSlovT3uZ9y LPgfjNcrVAjVgjpIKvFOzk6CbRpfwnOnww0hp4qZJK+M7f9UK58gKIxqyFO/PWOy6MF0 45UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hqJVTCDCFxfB8SbX9B3AQKW5hAgIrS3q+HymqTjz5Lk=; b=Mb/X4PWoAeSoAB89CstdxbsIqD7cBaZ2Af8IT0zl22pMhx7gnBLDqwed8ArYg7Ec0S 4mUg5nQCKaRv64J3YYpGcXPU2sVPHRhorWAtmg3x0BU6AGNdSaKIC9EgvMUBkxJwaO5g 5ZMfcnM2Ya1aO4cVJx5ejA19pa46IkSYWgCMXz1jbt5L/rIc5OWt+EPnCv4/z7Pg+AKP UDiYhsIp2W2zpx+2NriRGm9b5NMcgSPL3kL3tSv8WIBFeiSi149u7v1UWwRDrbQBZdh+ RhY9Qc5f8C5jCXUoslXItlLZXaMKpqnTFyPdK3t0mC76Y8a4Vokax8M4vhD2+OrrOf// bUJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=puCfv4I8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j207-20020a6280d8000000b004e16ae51118si8900201pfd.174.2022.02.28.04.06.24; Mon, 28 Feb 2022 04:06:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=puCfv4I8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235892AbiB1Lig (ORCPT + 99 others); Mon, 28 Feb 2022 06:38:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235883AbiB1Lie (ORCPT ); Mon, 28 Feb 2022 06:38:34 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA7EC4D248; Mon, 28 Feb 2022 03:37:55 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 71E1F60FFD; Mon, 28 Feb 2022 11:37:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1022C340F9; Mon, 28 Feb 2022 11:37:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646048274; bh=NMuZjdNCVeQj2VoQ5jMSwA/dHUHPZ7Mhms+WmvHKcaw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=puCfv4I80mTbhnHyUqTc9LSw3FPxPIOJ/vkuheGKL8juHQ+7OafzFbeIoOUiNrCzk gMcRYr5uV1QgmlA2AVn6fH3BtT9wmOgIs9iNnH1so1jgptzNGXyJSNUNB+mD3GKWqs E2XJQclA3FD72633y5W3VT8t4EU62kfI9ObJFzphTP1SAs7YsrIBe3/G3kytn/9qqP 5AHT3io7WPI82HCHJY9xunwb0bTqn6d4f/32za5KRCjqEkKdRHTt21XpXMpLeN/tBN BbNvU8hEz/6Lp8OapNZxReFBxhZ7uLVFNvhFYK1wsIb1vZ8/L7F83N5gNIw77oSuFB 0hR/PLkKQ9mRw== Received: by mail-wr1-f42.google.com with SMTP id d28so14969944wra.4; Mon, 28 Feb 2022 03:37:54 -0800 (PST) X-Gm-Message-State: AOAM533Mxj/AvQK941Qxx8qVLAjzq+Fwfh9hu8qiBRl3rTp5bMyPbkPj XZiTdAerH/NqciSV4pnlrpu5IcLcPEjke33fM4Y= X-Received: by 2002:a05:6000:1866:b0:1ef:8a14:ab6a with SMTP id d6-20020a056000186600b001ef8a14ab6amr7567987wri.12.1646048273093; Mon, 28 Feb 2022 03:37:53 -0800 (PST) MIME-Version: 1.0 References: <20220228103142.3301082-1-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Mon, 28 Feb 2022 12:37:37 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] [v2] Kbuild: move to -std=gnu11 To: Mark Rutland Cc: Linux Kbuild mailing list , Arnd Bergmann , Linus Torvalds , Masahiro Yamada , llvm@lists.linux.dev, Jonathan Corbet , Federico Vaga , Alex Shi , Hu Haowen , Michal Marek , Nick Desaulniers , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-doc-tw-discuss@lists.sourceforge.net, Linux ARM , Intel Graphics , dri-devel , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-btrfs , Marco Elver Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 28, 2022 at 12:25 PM Mark Rutland wrote: > On Mon, Feb 28, 2022 at 11:27:43AM +0100, Arnd Bergmann wrote: > > > > Nathan Chancellor reported an additional -Wdeclaration-after-statement > > warning that appears in a system header on arm, this still needs a > > workaround. > > FWIW, I had a go at moving to c99 a few weeks ago (to be able to use > for-loop-declarations in some concurrency primitives), and when I tried, I also > saw declaration-after-statement warnings when building modpost.c, which is easy > enough to fix: > > https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?h=treewide/gnu99&id=505775bd6fd0bc1883f3271f826963066bbdc194 I think the KBUILD_USERCFLAGS portion and the modpost.c fix for it make sense regardless of the -std=gnu11 change, but your change to KBUILD_CFLAGS is not actually needed because the warning is already enabled there -- gnu89 allows intermingled declarations since gcc-3.4, so the warning flag was added during early 2.6.x kernels. Arnd