Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2475602ima; Mon, 22 Oct 2018 10:20:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV619LYz/+aasHg6Xe0LnVHNqBnkdI+WF2kaxbwaSWpGKHUCwUlbM/8r7uzRslMifABYxakVW X-Received: by 2002:a17:902:bccc:: with SMTP id o12-v6mr46451356pls.202.1540228823768; Mon, 22 Oct 2018 10:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540228823; cv=none; d=google.com; s=arc-20160816; b=Js3silFja4G75XrfLbO9qVYR5HFWRQGwGocBxNhLPZ5vuEC8dPky38XKKq/v11JRZs dYv9afPeG2Ccrxb9XFlDJ47V7hhzRQTFKr25E1v3GUP6VSGMUunrlBmAXovblM4S//Ld 9vW0vx2F7NokoBVktyMS/9RYNF7jP1ERmJGleKkA8VokYDh1VgXRJOAOC/i9EFaKz3Dz 5CdeD0Hmgo35/0mT1hLQeGKNJyWGWx5CQMVo3z9uZgf3E3of92bcJsYN2wQO+Kl1bcBg URuVIKzN4wBQapAialDfAFmAJSGoWWEueGUBsPVveblJoV+wNGgnK6zASYLwue0VPssu WZ7A== 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=oA7xr5QeyWJpzokAhtSgAZl5pfjfuog8CUj3NpYcIkc=; b=QjBBKmmHlWCCmndbb6zEt6TBPPWp8u6E9sKEcqwM64CX/zAbkpPVx6ey5B4J4MqgXO ARmI3AAnep4j5lLd2z+urna74gdwx6Q0Qj/c9YdjgwxGK0W3TyQi3xpOU/SoH7V7RatV A3fVAzuMagZAonQqgNb7zqppHRPW7b+PUNe7OvrYvb5/geuaktOAYBVsQzRmbAXRbS4y laGUg8Lyq1Y2hyJmOYSuVxV3DMiqptzVegvb8qgFuy5uAg0dWsmCYeSFUTIao3ZIIhcF UeMdvEaLJYirn6ZkrbXu62j+rwj6qxyfgBpzwX3H7Q/1KR0JwPdSeEswRESTde8scBel Xyqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pToAUWGJ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17-v6si15951991pgj.272.2018.10.22.10.20.07; Mon, 22 Oct 2018 10:20:23 -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=@google.com header.s=20161025 header.b=pToAUWGJ; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728783AbeJWBhT (ORCPT + 99 others); Mon, 22 Oct 2018 21:37:19 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38092 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728623AbeJWBhT (ORCPT ); Mon, 22 Oct 2018 21:37:19 -0400 Received: by mail-pl1-f196.google.com with SMTP id p7-v6so435366plk.5 for ; Mon, 22 Oct 2018 10:17:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oA7xr5QeyWJpzokAhtSgAZl5pfjfuog8CUj3NpYcIkc=; b=pToAUWGJxfD4G2VB3Ervq0Msf+5dcWN7zvEuegKdnTlgHJ6Qb5lIIqMf+tXcv3ld2u z2IqNhpTlOpPtqgJwA1Sc2LqFliQGIDNdBy4/YEwO+GChHT4cffCgZCainXaRHmLxwW7 BuSRHuw/EFb71uQVQsUJeERaWGiSRsQzVBAGza763li/0MygUMaVdk3VVOFJLqxCG6Ma 5eZIldSOi2/Ar3BQz+8z3MAj4WcnYeGi252NgWIV3i/iakLxgJUCPFY5s/VyvZhzI1Z+ qPoioPtnB9k/M6UpmBheLZ5yUvcuDLUuxYTvw2cxkRmiBFenH8/7GZHJRkC+zm0+79bQ 4sDA== 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=oA7xr5QeyWJpzokAhtSgAZl5pfjfuog8CUj3NpYcIkc=; b=Q8g5nyYCzWxVNac0pbzZecpC17e4TRPX2zlRY0ioFSiQCv3B5KmS6F+YZ/CoXehxd9 rEopXqzFHXujV3DdTfDh9mGVR0sI6zmF/KAXTnkezZ3ssmdYj3yBRi3gE2TJZTptbBcx ZstkFW+NhgSymmBYXycsczfa2xWCcTGUGLvgZAfWi2VmHckgwULyNzOMJc3blAPkAjos XH+muUO40yBLeFf/BRUj5stccVR4a4k85F3AaSTwdFFewmQMyTzdpnd1mhmf8ZqIOI+z e2nu22fcOuOdvgREjCRQ1jpsx5i75/wR8KzIcTQs8OQ1HPKo3XsVidjBL5zdjXuHckBF pIhA== X-Gm-Message-State: AGRZ1gLVlJWHwclHLNT7zu3puqkEHr75IJWeSacGdWgtAkv7GPeP0USq OY8dYAMP7Il985aRfaHIBR3E6K28d3nVr3hNHh7v1g== X-Received: by 2002:a17:902:b412:: with SMTP id x18-v6mr11189744plr.13.1540228676261; Mon, 22 Oct 2018 10:17:56 -0700 (PDT) MIME-Version: 1.0 References: <20181021171414.22674-1-miguel.ojeda.sandonis@gmail.com> <20181021171414.22674-2-miguel.ojeda.sandonis@gmail.com> <20181021222712.GI1617@thunk.org> In-Reply-To: From: Nick Desaulniers Date: Mon, 22 Oct 2018 10:17:44 -0700 Message-ID: Subject: Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1) To: Miguel Ojeda Cc: Kees Cook , gustavo@embeddedor.com, "Theodore Ts'o" , Greg KH , LKML , dan.carpenter@oracle.com, adilger.kernel@dilger.ca, Masahiro Yamada , Michal Marek , rostedt@goodmis.org, mchehab+samsung@kernel.org, olof@lxom.net, Konstantin Ryabitsev , "David S. Miller" , Andrey Ryabinin , Thomas Gleixner , Ingo Molnar , Paul Lawrence , sandipan@linux.vnet.ibm.com, Andrey Konovalov , David Woodhouse , Will Deacon , Philippe Ombredanne , paul.burton@mips.com, David Rientjes , Willy Tarreau , msebor@gmail.com, sparse@chrisli.org, Jonathan Corbet , Geert Uytterhoeven , Rasmus Villemoes , joe@perches.com, Arnd Bergmann , asmadeus@codewreck.org, Stefan Agner , Luc Van Oostenryck , Andrew Morton , Linus Torvalds , linux-doc@vger.kernel.org, linux-ext4@vger.kernel.org, linux-sparse@vger.kernel.org, Linux Kbuild mailing list 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 Mon, Oct 22, 2018 at 2:43 AM Miguel Ojeda wrote: > > On Mon, Oct 22, 2018 at 11:41 AM Miguel Ojeda > wrote: > > > > * clang does *not* support the attribute in C. > > ...nor the warning at all, by the way (which is why this is OK). > > Cheers, > Miguel Oh? We're going through and annotating all of Android's C++ source right now with it. https://clang.llvm.org/docs/DiagnosticsReference.html#wimplicit-fallthrough Though it looks like the attribute syntax I like from GCC is not yet supported in Clang. https://bugs.llvm.org/show_bug.cgi?id=37135 https://github.com/ClangBuiltLinux/linux/issues/235 I'll take a look at adding support. So Kees sent me this embarrassing example: https://godbolt.org/z/gV_c9_ (try changing the language from C++ to C; it works)! That's embarrassing! https://bugs.llvm.org/show_bug.cgi?id=39382 https://github.com/ClangBuiltLinux/linux/issues/236 Will get these both fixed up. -- Thanks, ~Nick Desaulniers