All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: "Tyler Retzlaff" <roretzla@linux.microsoft.com>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	<dev@dpdk.org>
Subject: Re: static_assert, sfc, and clang issues
Date: Tue, 16 Jan 2024 14:49:52 -0800	[thread overview]
Message-ID: <20240116144952.3614593f@hermes.local> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F169@smartserver.smartshare.dk>

On Tue, 16 Jan 2024 23:14:36 +0100
Morten Brørup <mb@smartsharesystems.com> wrote:

> > +1 for #2 just make it a block.  
> 
> I prefer that you implement the workaround in the RTE_BUILD_BUG_ON() macro, by surrounding it by "do { } while (0)", like this:
> 
> #define RTE_BUILD_BUG_ON(condition) do { static_assert(!(condition), #condition); } while (0)
> 
> And please mention the workaround reason, with the reference to the clang bug, in the source code comment describing the function.
> 
> The godbolt link in the clang issue seems happy with this workaround.

In the patch series sent, already did that. Didn't need to do { } while(0) hack to make it work.
Reference is in commit message.

  parent reply	other threads:[~2024-01-16 22:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 17:03 static_assert, sfc, and clang issues Stephen Hemminger
2024-01-16 21:50 ` Tyler Retzlaff
2024-01-16 22:14   ` Morten Brørup
2024-01-16 22:18     ` Morten Brørup
2024-01-16 22:49     ` Stephen Hemminger [this message]
2024-01-17  8:07       ` Andrew Rybchenko
2024-01-17  9:37       ` Morten Brørup

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=20240116144952.3614593f@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=roretzla@linux.microsoft.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.