eal/x86: fix pedantic build
PATCH 1/1 eal/x86: fix pedantic build
When enabling pedantic compilation with CONFIG_RTE_LIBRTE_MLX5_DEBUG, the compiler complains about non standard 128-bit integer type:
include/rte_atomic_64.h:223:3: error:
ISO C does not support ‘__int128’ types [-Werror=pedantic]
It must be marked as an extension of the standard C language to be accepted in pedantic compilation.
--- lib/librte_eal/common/include/arch/x86/rte_atomic_64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_eal/common/include/arch/x86/rte_atomic_64.h +1 -1
@@ -220,7 +220,7 @@ typedef struct {RTE_STD_C11 union {uint64_t val[2 ]; -__int128 int128; + __extension____int128 int128; }; } __rte_aligned(16) rte_int128_t;
Signature · 1 line
2.21.0
04/04/2019 15:00, Thomas Monjalon:
Quoted 11 lines
When enabling pedantic compilation with
CONFIG_RTE_LIBRTE_MLX5_DEBUG, the compiler complains about non standard 128-bit integer type:
include/rte_atomic_64.h:223:3: error:
ISO C does not support ‘__int128’ types [-Werror=pedantic]It must be marked as an extension of the standard C language to be accepted in pedantic compilation.
Reported-by Ferruh Yigit <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>
Forgot one line:
Note: It seems only Ferruh can reproduce it.
I wonder whether the RTE_STD_C11 of the union is hiding the issue.
Eads, Gage
Acked-byQuoted 15 lines
04/04/2019 15:00, Thomas Monjalon:
Quoted 1 line
When enabling pedantic compilation with
CONFIG_RTE_LIBRTE_MLX5_DEBUG,Quoted 10 lines
the compiler complains about non standard 128-bit integer type:
include/rte_atomic_64.h:223:3: error:
ISO C does not support ‘__int128’ types [-Werror=pedantic]It must be marked as an extension of the standard C language to be accepted in pedantic compilation.
Reported-by Ferruh Yigit <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>
Quoted 8 lines
Forgot one line:
Fixes 640c5f09ef2c ("eal/x86: add 128-bit atomic compare exchange")Note: It seems only Ferruh can reproduce it.
I wonder whether theRTE_STD_C11of the union is hiding the issue.
With that change:
Ferruh Yigit
Tested-byQuoted 19 lines · Gage
Quoted 19 lines
04/04/2019 15:00, Thomas Monjalon:
Quoted 1 line
When enabling pedantic compilation with
CONFIG_RTE_LIBRTE_MLX5_DEBUG,Quoted 10 lines
the compiler complains about non standard 128-bit integer type:
include/rte_atomic_64.h:223:3: error:
ISO C does not support ‘__int128’ types [-Werror=pedantic]It must be marked as an extension of the standard C language to be accepted in pedantic compilation.
Reported-by Ferruh Yigit <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>Forgot one line:
Fixes 640c5f09ef2c ("eal/x86: add 128-bit atomic compare exchange")
Quoted 8 lines
Quoted 4 lines
Note: It seems only Ferruh can reproduce it.
I wonder whether theRTE_STD_C11of the union is hiding the issue.With that change:
Acked-by Gage Eads <[email protected]>
I confirm it fixes the build issue:
Thomas Monjalon
Applied04/04/2019 17:13, Ferruh Yigit:
Quoted 22 lines · Gage
Quoted 21 lines
Quoted 20 lines
04/04/2019 15:00, Thomas Monjalon:
Quoted 1 line
When enabling pedantic compilation with
CONFIG_RTE_LIBRTE_MLX5_DEBUG,Quoted 10 lines
the compiler complains about non standard 128-bit integer type:
include/rte_atomic_64.h:223:3: error:
ISO C does not support ‘__int128’ types [-Werror=pedantic]It must be marked as an extension of the standard C language to be accepted in pedantic compilation.
Reported-by Ferruh Yigit <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>Forgot one line:
Fixes 640c5f09ef2c ("eal/x86: add 128-bit atomic compare exchange")Note: It seems only Ferruh can reproduce it.
I wonder whether theRTE_STD_C11of the union is hiding the issue.
Quoted 7 lines
Quoted 3 lines
With that change:
Acked-by Gage Eads <[email protected]>I confirm it fixes the build issue:
Tested-by Ferruh Yigit <[email protected]>
Applied, thanks