From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 98ED3A04AB; Tue, 12 Nov 2019 11:02:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C92822B8E; Tue, 12 Nov 2019 11:02:46 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id D460B374 for ; Tue, 12 Nov 2019 11:02:44 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2019 02:02:43 -0800 X-IronPort-AV: E=Sophos;i="5.68,295,1569308400"; d="scan'208";a="198026238" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.46]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Nov 2019 02:02:42 -0800 Date: Tue, 12 Nov 2019 10:02:39 +0000 From: Bruce Richardson To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: <20191112100239.GA1476@bricha3-MOBL.ger.corp.intel.com> References: <20191111192803.24703-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191111192803.24703-1-stephen@networkplumber.org> User-Agent: Mutt/1.12.1 (2019-06-15) Subject: Re: [dpdk-dev] [RFC] use Gcc/Clang fallthrough attribute X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Nov 11, 2019 at 11:28:03AM -0800, Stephen Hemminger wrote: > Use an explicit statement fallthrough attibute, rather than relying on > having correct fallthrough comments (that match the magic set of regex > which depends on the value of compiler flags). This is more robust and > safer. > > Introduces __rte_fallthrough and fixes existing code to use it. > > Motivated after seeing recent travis build failures. I wonder how much safer this actually is? The comments to be used are well documented in the GCC documentation so it's not that hard to pick one that works well and standardize on that. Overall I think I prefer the comments, as I find the use of a macro ugly when flagging something like this. /Bruce