Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2795535ima; Mon, 22 Oct 2018 16:25:53 -0700 (PDT) X-Google-Smtp-Source: ACcGV60v6bc1oUjtCqeULu3Ku/ONJrLo2Cw49wn268p2XdUmxBYAYSgN0e9mzjRS13PjxOIm6AUF X-Received: by 2002:a63:cd45:: with SMTP id a5-v6mr45443478pgj.43.1540250753608; Mon, 22 Oct 2018 16:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540250753; cv=none; d=google.com; s=arc-20160816; b=Pkyg0uPz3dxWg8ezwsjwMDLTgLuT7qATHIlnUTievVVnepFVIKhcAFkoz9hGD2uik6 meC+y/yUKWOsHMkkdJ54u9u2S1DhJflYsRD/8yM8/BykHE5STRgzIxC3d8bBLWfYNxBI AV4AN32gNkCwGlOfC8dJ/aQ/j09DhXQqdi0ckG7Nv6ob7lOhvRwPogKBBib6HUhkTVmL OQp7zDApEuVFmUONOtd3Cd/P00RCYSjP4u5G/1M6ezfxODiu2j6vXVuf9E6MWoCG+s9C QlEHGC8rnZ6j7R1iGyL9sQyMMNB0Repy1AIC4dUpymEXcJVORm+f2Ghc18BgtgK+UVB6 ENxw== 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=8HCiXpAVJicrn/bOthmQj0WB0woFgZYyFT6m/r7QNpY=; b=FK8/jbOV4CvRa1Wgck4MwpN+bEF6VTvZujIzifLWrrKx8P40GxX0jaUCyvXdM/sR0h nSVsN/Br41i1tXbD+jKyocWTw/qOKVOF9R8Bm01U7htN6BIriD6HJxG9z9BhDa8fogKF uMBZVIyWZDwpGWiTVGnuXJqTsLrXaxktY9m33h2FzZ5ORsUUd6MDKHQqh5HejNAJrJ6g cB5KegIKP7BEYhYcqNhA9REktzwLKpwjVDc9rCvc6i++v3uPnMkE0EFOF5Rz9O1+QLwv a9izCpaFrIvv5e30ORLm+dR8G6sJ1rCiLKalcgZPnifbNP/gplIWS75pKsdDQVTfXKTh 5b/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZkAgiFPy; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v27-v6si13468374pfl.233.2018.10.22.16.25.34; Mon, 22 Oct 2018 16:25:53 -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=@gmail.com header.s=20161025 header.b=ZkAgiFPy; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729176AbeJWFTl (ORCPT + 99 others); Tue, 23 Oct 2018 01:19:41 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:43762 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727063AbeJWFTk (ORCPT ); Tue, 23 Oct 2018 01:19:40 -0400 Received: by mail-lf1-f66.google.com with SMTP id p34-v6so31523864lfg.10; Mon, 22 Oct 2018 13:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8HCiXpAVJicrn/bOthmQj0WB0woFgZYyFT6m/r7QNpY=; b=ZkAgiFPyrfWPWVMR0JZ/oXcVFh2dKX0j7AQd5OHh8vLR13r/DSzT8FYSHiWX7xa5RZ ooCjqme8iEXBt4XaOibLXevj0ppLpsLvzBqlOSrPYeSZE6yTsGXT/aXlHOQA6BpiKumQ JlTJCMZAAz9UyjFCveu38LyPF+6epny6/aby7e0Oaly4DEaTB1Ac8sM4vsCFTZAYRbcb J8/A2Si1FvpRLHyRlD5EcnwNVYsvvblHu48vEu9doJ/6PRNk/Hn5Qag6Xf+HDn4nRl2+ SAtWEamP0zg4jcmL1Z6aLcbYCZ1p3OhNFS6N2p96A7G98YmT7u8p5yE1b5A5iEl+WksM Jdyw== 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=8HCiXpAVJicrn/bOthmQj0WB0woFgZYyFT6m/r7QNpY=; b=LWXj4gTBP0MgOTHK/KoMLoffI/mTTPuOVwH1XPLJgsQZz1drQQYVotbF4uKV7g144v xLqkdBRJ6LQ2KtcYULyFO/ayrztsXagJhm11SWMxKyk5PISwjvYHL+TrhY1DGBemKsmX ixU1FzbgJY7e8ps0L5zvnHWj3rswIzJ33B5HPuFR6zcenGdtmvm1jsmeht4nC5FFbpN4 RN5NHS2F7LRYlfZRiLXq/XLZgcBNbKworqIKB7oyag4Beho65mhbHzkeOPtTSTqJbkRs Jd8lpKLZqoupI7prQbiP5F0xtB9LvPDaKknBCGhb1N4dEw/i1WiWxVUfLB/W3rzwAmMb ReZQ== X-Gm-Message-State: ABuFfoiGy1N8bW2Ygt/fLckQqUbPUCaC3M4atNWzKG1HsTdfHgXxpiuM ZO7awwfci9wQnxNO+fbpD19Vj/fnlM6gafwrlSQ= X-Received: by 2002:a19:11c2:: with SMTP id 63mr9961183lfr.131.1540241968459; Mon, 22 Oct 2018 13:59:28 -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: Miguel Ojeda Date: Mon, 22 Oct 2018 22:59:16 +0200 Message-ID: Subject: Re: [PATCH 1/2] Compiler Attributes: add support for __fallthrough (gcc >= 7.1) To: Nick Desaulniers Cc: Kees Cook , "Gustavo A. R. Silva" , "Ted Ts'o" , Greg KH , linux-kernel , Dan , Andreas Dilger , Masahiro Yamada , Michal Marek , Steven Rostedt , Mauro Carvalho Chehab , Olof Johansson , Konstantin Ryabitsev , David Miller , Andrey Ryabinin , Thomas Gleixner , Ingo Molnar , Paul Lawrence , Sandipan Das , Andrey Konovalov , David Woodhouse , Will Deacon , Philippe Ombredanne , Paul Burton , David Rientjes , Willy Tarreau , Martin Sebor , Christopher Li , Jonathan Corbet , Geert Uytterhoeven , Rasmus Villemoes , Joe Perches , Arnd Bergmann , Dominique Martinet , Stefan Agner , Luc Van Oostenryck , Andrew Morton , Linus Torvalds , Linux Doc Mailing List , Ext4 Developers List , linux-sparse@vger.kernel.org, linux-kbuild@vger.kernel.org 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 7:17 PM Nick Desaulniers wrote: > > 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 > Sure, but I am talking about the C mode only. Please read the previous messages in the thread :-) > Though it looks like the attribute syntax I like from GCC is not yet > supported in Clang. Indeed, that is what I explained in the last message. > 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! Yup, that is what I have been testing yesterday -- see the linked thread in the commit message for the summary of the results. > https://bugs.llvm.org/show_bug.cgi?id=39382 > https://github.com/ClangBuiltLinux/linux/issues/236 > Will get these both fixed up. Cheers, Miguel