24/03/2021 05:26, Tyler Retzlaff:
> --- a/lib/librte_eal/include/rte_common.h
> +++ b/lib/librte_eal/include/rte_common.h
> @@ -31,9 +31,11 @@ extern "C" {
>  #define typeof __typeof__
>  #endif
>  
> +#ifndef __cplusplus
>  #ifndef asm
>  #define asm __asm__
>  #endif
> +#endif

Applied with this explanation:

    eal: do not redefine asm keyword in C++
    
    C++ forbids redefining a keyword as a macro.
    The keyword asm is conditionally-supported and implementation defined,
    but it seems our best guess.
    
    In C, if asm does not exist, it is defined as __asm__
    which is a GNU extension.


One more question:
Can we have a similar issue with typeof?
I guess it works because typeof is not a keyword?


Reply via email to