On Tue, 11 Feb 2025 14:01:57 -0800
Andre Muezerie <andre...@linux.microsoft.com> wrote:

> There's no MSVC equivalent for compiler extension __builtin_constant_p.
> EAL already had __rte_constant which was used as a first attempt to
> workaround __builtin_constant_p when using MSVC. However, there are
> pieces of code that would benefit from being able to provide a default
> value to be used instead of it being always 0 like how it was done by
> __rte_constant.
> 
> A new macro is added here allowing such default to be provided by the
> caller.
> 
> Signed-off-by: Andre Muezerie <andre...@linux.microsoft.com>

There is a hack way of determining if expression is constant using sizeof
tricks, maybe that would be ideal solution?

Reply via email to