RE: static_assert, sfc, and clang issues

2024-01-17 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Tuesday, 16 January 2024 23.50 > > On Tue, 16 Jan 2024 23:14:36 +0100 > Morten Brørup wrote: > > > > +1 for #2 just make it a block. > > > > I prefer that you implement the workaround in the RTE_BUILD_BUG_ON() > macro, by surr

Re: static_assert, sfc, and clang issues

2024-01-17 Thread Andrew Rybchenko
On 1/17/24 01:49, Stephen Hemminger wrote: On Tue, 16 Jan 2024 23:14:36 +0100 Morten Brørup 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(condit

Re: static_assert, sfc, and clang issues

2024-01-16 Thread Stephen Hemminger
On Tue, 16 Jan 2024 23:14:36 +0100 Morten Brørup 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(!(condi

RE: static_assert, sfc, and clang issues

2024-01-16 Thread Morten Brørup
> From: Morten Brørup [mailto:m...@smartsharesystems.com] > Sent: Tuesday, 16 January 2024 23.15 > > > From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > > Sent: Tuesday, 16 January 2024 22.51 > > > > On Tue, Jan 16, 2024 at 09:03:01AM -0800, Stephen Hemminger wrote: > > > Ran into a cor

RE: static_assert, sfc, and clang issues

2024-01-16 Thread Morten Brørup
> From: Tyler Retzlaff [mailto:roret...@linux.microsoft.com] > Sent: Tuesday, 16 January 2024 22.51 > > On Tue, Jan 16, 2024 at 09:03:01AM -0800, Stephen Hemminger wrote: > > Ran into a corner case issue, so sending to mailing list for wider > discussion. > > > > One improvement to DPDK code base

Re: static_assert, sfc, and clang issues

2024-01-16 Thread Tyler Retzlaff
On Tue, Jan 16, 2024 at 09:03:01AM -0800, Stephen Hemminger wrote: > Ran into a corner case issue, so sending to mailing list for wider discussion. > > One improvement to DPDK code base planned is getting rid of variable length > arrays. > VLA's can cause bugs and are not supported by the Windows

static_assert, sfc, and clang issues

2024-01-16 Thread Stephen Hemminger
Ran into a corner case issue, so sending to mailing list for wider discussion. One improvement to DPDK code base planned is getting rid of variable length arrays. VLA's can cause bugs and are not supported by the Windows compiler. Gcc and Clang have a flag to warn on use of VLA's (-Wvla). In DPD