Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2759525pxm; Mon, 28 Feb 2022 05:39:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwsyN6cYIhO4z/CtCmn9WxklTycGSZ8tGvY/38r+rrIV29lMdo/JAKLVqyRI4USRAUs8c1B X-Received: by 2002:a17:902:e34b:b0:14f:af20:4b3c with SMTP id p11-20020a170902e34b00b0014faf204b3cmr20925590plc.56.1646055549886; Mon, 28 Feb 2022 05:39:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646055549; cv=none; d=google.com; s=arc-20160816; b=dE8c4KWrvbUdgkb6qSjH+ayGctqzC8XWEfJ0UFwYAjHvp9mmW8drpMs+ryT3j1Rjrm 3KD0vH1zaf32uuE8STNXpc26tg74W0fV7+hFyR/c3WZhq12Rr8jXjhItRG6FqcGNF4pN 7teu9h94Udsie3h8cdg7O7JTmYs+Up1dVNkRK3tB11VCKH267TR6HVMsjmPCd3rjBWoV 5gV1Qr2Wtb/u5HR9XCw7aBcy5cHlmLEYsvpqNFhM3h1oYjQEM2lOM6lXKecfR2hc2zPF 1Yl7Kobr1iar6h4cJtWVPmZU+CUSpUnD1ckDTKqwA17h4WCkRa1YZWMEYBuMtmN9MDxc Yu3g== 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=NX7QTTMXCR9sWYKj99TPe64i+kzLx5Pzaa5IMzJMTsw=; b=iRE0HUcgLDtsT/o9JhMqqN5R/yhQ3G0z07VF5YYsmAcIL9snRMvzCZx8jvt9o2oLdU okxlFYvQ+Rihd3ynec2GMPtUJXsxBAZO4qgxcnz6TFPPtnta5wL+8M4DTTfE205FK/b+ Yrs5MAiFuAzQM9Wn3hDw7XDYdNhCqzixTnxde72x2XLmXk7B2rhHS2sttMNWGn+Tk9cO 17YGOG00Nwb8vqQLVTeQDsKPtDB/JecdBw1yzJ99tYPPaSB3JPQ8MciXv2DQUv2OeS8w HtSKkcBnqQeToJmGf4Ae8LzL6tg1DWb1xugP9Mt1dKbYmNJVUfrXeYvODsL0g+4UGCM4 r1JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dKnUYFqw; 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 u16-20020a17090abb1000b001bd5eb0e168si1624852pjr.140.2022.02.28.05.38.53; Mon, 28 Feb 2022 05:39:09 -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=dKnUYFqw; 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 S236069AbiB1L64 (ORCPT + 99 others); Mon, 28 Feb 2022 06:58:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233606AbiB1L6w (ORCPT ); Mon, 28 Feb 2022 06:58:52 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 174F55596; Mon, 28 Feb 2022 03:58:14 -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 A9C4E61119; Mon, 28 Feb 2022 11:58:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CA16C340FF; Mon, 28 Feb 2022 11:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646049493; bh=+wvb9UMyXw53TgaflmlowqbBW5U339MQvEG61L0RkPg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dKnUYFqwp2nljzB9HyNzLWj4aTyNWXVZA+BytLq5D7XB/wn2bgjZiMOaqskVpLuiD bk1rXCLmdHoF9yjad0YHG+aChMto6BWqkOaSNkASogtC0xwnUDMGmRpKWwbUUHIN9G T2jY86/3NyMp3QaiaqAGDioEuxukYv9eQ1s5RlKdtbtoQzRo06NdJeugzhX7GPJJPU 4H6CnJkW0b+1gc1ha/tl8+JooMzw6m0qyd4IheUg8d+VSgFqd3J4We8CPaaoborU6O 8ENUz+sQQa6Y+L8l2JDIzlj6xsFuwZlKFvfhceBVVAHW1OeYHoq8q01WwDXvR36vjs Kk7LHoUofOmAg== Received: by mail-wr1-f42.google.com with SMTP id u1so15010578wrg.11; Mon, 28 Feb 2022 03:58:13 -0800 (PST) X-Gm-Message-State: AOAM533dw46uGUwTvUa5+wLE9uoN2h5ATbcYOXdDFFbTns6XthZ/3n9D /HEjl7TAFNEZb0KAX1gjhqYR+GYnDlAnbQWM97U= X-Received: by 2002:adf:edc3:0:b0:1ec:5f11:5415 with SMTP id v3-20020adfedc3000000b001ec5f115415mr13633412wro.317.1646049491206; Mon, 28 Feb 2022 03:58:11 -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:57:55 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] [v2] Kbuild: move to -std=gnu11 To: Marco Elver 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 , Mark Rutland 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:47 PM Marco Elver wrote: > On Mon, 28 Feb 2022 at 11:32, 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. > > On the topic of Wdeclaration-after-statement, Clang only respects this > warning with C99 and later starting with Clang 14: > https://github.com/llvm/llvm-project/commit/c65186c89f35#diff-ec770381d76c859f5f572db789175fe44410a72608f58ad5dbb14335ba56eb97R61 > > Until Clang 14, -Wdeclaration-after-statement is ignored by Clang in > newer standards. If this is a big problem, we can probably convince > the Clang stable folks to backport the fixes. However, the build won't > fail, folks might just miss the warning if they don't also test with > GCC. I don't expect this is to be a big issue, as long as the latest clang behaves as expected. There are many warnings that are only produced by one of the two compilers, so this is something we already deal with. I think it's more important to address the extra warning that Nathan reported, where clang now complains about the intermingled declaration in a system header when previously neither gcc nor clang noticed this. > > The differences between gnu99, gnu11, gnu1x and gnu17 are fairly > > minimal and mainly impact warnings at the -Wpedantic level that the > > kernel never enables. Between these, gnu11 is the newest version > > that is supported by all supported compiler versions, though it is > > only the default on gcc-5, while all other supported versions of > > gcc or clang default to gnu1x/gnu17. > > > > Link: https://lore.kernel.org/lkml/CAHk-=wiyCH7xeHcmiFJ-YgXUy2Jaj7pnkdKpcovt8fYbVFW3TA@mail.gmail.com/ > > Link: https://github.com/ClangBuiltLinux/linux/issues/1603 > > Suggested-by: Linus Torvalds > > Cc: Masahiro Yamada > > Cc: linux-kbuild@vger.kernel.org > > Cc: llvm@lists.linux.dev > > Signed-off-by: Arnd Bergmann > > Acked-by: Marco Elver Thanks, Arnd