Re: [RFC] eal: use _Static_assert() for RTE_BUILD_BUG_ON

2023-11-13 Thread Tyler Retzlaff
On Sat, Nov 11, 2023 at 06:52:26PM +0100, Morten Brørup wrote: > > From: Stephen Hemminger [mailto:step...@networkplumber.org] > > Sent: Saturday, 11 November 2023 18.22 > > > > The method of doing sizeof a bad array element was an interesting > > hack but it has a couple of problems. First, it wo

Re: [RFC] eal: use _Static_assert() for RTE_BUILD_BUG_ON

2023-11-13 Thread Tyler Retzlaff
On Sat, Nov 11, 2023 at 09:21:53AM -0800, Stephen Hemminger wrote: > The method of doing sizeof a bad array element was an interesting > hack but it has a couple of problems. First, it won't work if > VLA checking is enabled. It doesn't enforce that the expression > is constant. > > Replace that w

RE: [RFC] eal: use _Static_assert() for RTE_BUILD_BUG_ON

2023-11-11 Thread Morten Brørup
> From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Saturday, 11 November 2023 18.22 > > The method of doing sizeof a bad array element was an interesting > hack but it has a couple of problems. First, it won't work if > VLA checking is enabled. It doesn't enforce that the expres