DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC] use Gcc/Clang fallthrough attribute
Date: Tue, 12 Nov 2019 10:02:39 +0000	[thread overview]
Message-ID: <20191112100239.GA1476@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20191111192803.24703-1-stephen@networkplumber.org>

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

      reply	other threads:[~2019-11-12 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 19:28 Stephen Hemminger
2019-11-12 10:02 ` Bruce Richardson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191112100239.GA1476@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).