Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp1849337ybh; Sun, 4 Aug 2019 11:10:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBqQLl4cB9eFgVgfZritrpKYPBOOsgu3GmRUJOaXQVviAs2FQCc6TxPfEPID5re+7FZjAy X-Received: by 2002:a17:902:b949:: with SMTP id h9mr130030910pls.120.1564942234087; Sun, 04 Aug 2019 11:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564942234; cv=none; d=google.com; s=arc-20160816; b=pPMmpKybMyburaqytc61xJgeoct3PwYPn1f71BRZPdnc0fQrwwnM5YLCvsTGX0xgBk msga15pL/ianvk2Av7hgdNLoFM/NNWSQicRBdgAQ9pK/b3INTu/2RSVE9GS/kis5TK+N UITRaApexazBqMCAUVe+252pwN+4VPDBEsSORCUgYiYkCTPLNTyO7V+NaP8+RfLjfQxo n9ptZ09I2KeaphlflziRewY5oFDounIENpN0YV0kfW0TfxEjbZiuOYSHv1PDzfM71qvT zpdDQTMp1ERspqOz5YcwYy5auCSsTU/e24MrbQrQD1f1WPaoa6H2JtcKb0YEGeK42PPa q/xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wuBlwfX+hCs0Uc67OFIfuS67/SKzbTgBZUEERY3pI40=; b=fpcpAtid1LId55iz8t3iU3+1+eV1mZTpAOJvgcBVNaHfts7k8LMq4l2kjz+GHfuWb0 4MMs3NxVdR7v5HBRwmxcFyOvq2fl+ccLunggSvzHkTc61jNYh54xQiUUOjvPStV7tysV UGs4a0zop+Asse394kzXgH1hOv5WbwBrvCE7DBD7Wpx8hfwplSJ7NgRS5hml08JZHNrv MDlWVlDP7m8+apH0rMgX7V0xWgpeoQKW4stsH08gpIHFIQWNl/cmlykaMfMPyjpWjnqt 1jhh0xK7XpF4Vv22PdS7Vs6n+8bXhD7T3k3RpV7vd1WVoWSrJ/YovVcDDDTYABYCCKD5 tluw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=E315dOoL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v31si10624550pjb.22.2019.08.04.11.10.16; Sun, 04 Aug 2019 11:10:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=E315dOoL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726594AbfHDSJl (ORCPT + 99 others); Sun, 4 Aug 2019 14:09:41 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:42216 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726474AbfHDSJl (ORCPT ); Sun, 4 Aug 2019 14:09:41 -0400 Received: by mail-lf1-f66.google.com with SMTP id s19so56253816lfb.9 for ; Sun, 04 Aug 2019 11:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wuBlwfX+hCs0Uc67OFIfuS67/SKzbTgBZUEERY3pI40=; b=E315dOoLFMqppqp5n5kltpgS92j72T86foZlb+w3GlUbAIAQBSgMxt5G1EJSE3/aOu WRr0D5qZXenrvlsM5M0QYelhXeeshSDV09e49feROiwBmtuu7LgX7Vw1snhcgZ1kNM/g eqvCOC2JKgyPUTbRknS1L/YSIj7+8KyqUFzeA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wuBlwfX+hCs0Uc67OFIfuS67/SKzbTgBZUEERY3pI40=; b=dCpQoAn/1b7hUJ2vJQXXeuU6+TrGzCfgDLCh2dvmDUdQvNkXzzCjl7OvgdgN/k08EL HyM2KS3L1kN6arjXvEj8kdKaB3qPMsrv9s3ZEH240cTG1FgSNQI2X9yjy/HnSWj+3ChM 9Gemhb1ghUfO+2oO/g2+eAgLsm2ONPkNMGZ6uVe+j9QTCOo6vE+CydAjL5HuGXfUtbYc i3lMx+79+KmvPBkPItOXsn25WZ9o1ZUpA0FfFg+qNeJsJFDiE3QmG4lTzQ3tb7Aahfv8 NXlkIDx5UiIIfVHyICBM4+RHRYo6+n5Iydm6UQ0QIG6LqcsXFHF748Cx+ZXcKInEvlXX evgQ== X-Gm-Message-State: APjAAAVV0bsA1Y8LfD23gU9+8dcqZWgyzwjHF/0uCAvJ4b1XwfFek2Ik DzVnd0/Am5H946f1I/8DoDMZN633jUE= X-Received: by 2002:a05:6512:1da:: with SMTP id f26mr68275520lfp.129.1564942178425; Sun, 04 Aug 2019 11:09:38 -0700 (PDT) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id 2sm16526827lji.94.2019.08.04.11.09.35 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sun, 04 Aug 2019 11:09:36 -0700 (PDT) Received: by mail-lf1-f53.google.com with SMTP id v16so2381299lfg.11 for ; Sun, 04 Aug 2019 11:09:35 -0700 (PDT) X-Received: by 2002:ac2:5c42:: with SMTP id s2mr59076019lfp.61.1564942175718; Sun, 04 Aug 2019 11:09:35 -0700 (PDT) MIME-Version: 1.0 References: <1d2830aadbe9d8151728a7df5b88528fc72a0095.1564549413.git.joe@perches.com> In-Reply-To: From: Linus Torvalds Date: Sun, 4 Aug 2019 11:09:19 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use To: Joe Perches Cc: Miguel Ojeda , Kees Cook , Peter Zijlstra , Borislav Petkov , "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , Pavel Machek , "Gustavo A . R . Silva" , Arnaldo Carvalho de Melo , Kan Liang , Namhyung Kim , Jiri Olsa , Alexander Shishkin , Shawn Landden , "the arch/x86 maintainers" , Linux List Kernel Mailing , Neil Horman , David Miller Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 4, 2019 at 11:01 AM Joe Perches wrote: > > Linus? Do you have an opinion about this RFC/patch? So my only real concern is that the comment approach has always been the really traditional one, going back all the way to 'lint' days. And you obviously cannot use a #define to create a comment, so this whole keyword model will never be able to do that. At the same time, all the modern tools we care about do seem to be happy with it, either through the gcc attribute, the clang [[clang:fallthrough]] or the (eventual) standard C [[fallthrough]] model. So I'm ok with just saying "the comment model may be traditional, but it's not very good". I didn't look at all the patches, but the one I *did* see had a few issues: - it didn't seem to handle clang - we'd need to make -Wimplicit-fallthrough be dependent on the compiler actually supporting the attribute, not just on supporting the flag. without those changes, nobody can actually start doing any conversions. But I assume such patches exist somewhere, and I've just missed them. Linus