04/05/2026 11:06, Thomas Monjalon:
> 04/05/2026 10:37, Thomas Monjalon:
> > The user and count fields of rte_spinlock_recursive_t
> > do not need the volatile qualifier
> > because they are only accessed by the thread holding the lock,
> > which already provides the necessary memory ordering.
> >
> > Removing volatile aligns with a C++20 deprecation
> > for increment and decrement of volatile variables.
> >
> > This issue was seen with GCC 16 which changes the default C++ version
> > from -std=gnu++17 to -std=gnu++20.
> >
> > Fixes: af75078fece3 ("first public release")
> > Cc: [email protected]
> >
> > Signed-off-by: Thomas Monjalon <[email protected]>
>
> I've just found this has been discussed 4 years ago:
> https://inbox.dpdk.org/dev/[email protected]
>
> Stephen had found some comments issues that I will fix in another patch.
Adding the compiler messages:
rte_spinlock.h:241:14: error: '++' expression of 'volatile'-qualified type is
deprecated [-Werror=volatile]
rte_spinlock.h:252:21: error: '--' expression of 'volatile'-qualified type is
deprecated [-Werror=volatile]
rte_spinlock.h:278:14: error: '++' expression of 'volatile'-qualified type is
deprecated [-Werror=volatile]