From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: "Stephen Hemminger" <stephen@networkplumber.org>,
"Morten Brørup" <mb@smartsharesystems.com>
Cc: Tyler Retzlaff <roretzla@linux.microsoft.com>, dev@dpdk.org
Subject: Re: static_assert, sfc, and clang issues
Date: Wed, 17 Jan 2024 11:07:49 +0300 [thread overview]
Message-ID: <dc661e3f-aefc-4c2c-9109-74272493560c@oktetlabs.ru> (raw)
In-Reply-To: <20240116144952.3614593f@hermes.local>
On 1/17/24 01:49, Stephen Hemminger wrote:
> 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.
I'm OK with the solution in the patch series. Thanks a lot.
next prev parent reply other threads:[~2024-01-17 8:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 17:03 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
2024-01-17 8:07 ` Andrew Rybchenko [this message]
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=dc661e3f-aefc-4c2c-9109-74272493560c@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=roretzla@linux.microsoft.com \
--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).