Hi, On Wed, Oct 23, 2019 at 10:50:52AM +0000, Raslan Darawsheh wrote: > Hi, > > This patch broke the compilation of MLX5 PMD in debug mode: > > from > /root/dpdk/x86_64-native-linux-gcc/include/rte_ethdev_driver.h:18, > from /root/dpdk/drivers/net/mlx5/mlx5_mp.c:11: > /root/dpdk/x86_64-native-linux-gcc/include/rte_higig.h:112:2: error: type of > bit-field 'opcode' is a GCC extension [-Werror=pedantic] > uint16_t opcode:3; > ^ > /root/dpdk/x86_64-native-linux-gcc/include/rte_higig.h:113:2: error: type of > bit-field 'resv1' is a GCC extension [-Werror=pedantic] > uint16_t resv1:2; > ^ > /root/dpdk/x86_64-native-linux-gcc/include/rte_higig.h:114:2: error: type of > bit-field 'src_t' is a GCC extension [-Werror=pedantic] > uint16_t src_t:1; > ^ > /root/dpdk/x86_64-native-linux-gcc/include/rte_higig.h:115:2: error: type of > bit-field 'pfm' is a GCC extension [-Werror=pedantic] > uint16_t pfm:2; > ^ > /root/dpdk/x86_64-native-linux-gcc/include/rte_higig.h:116:2: error: type of > bit-field 'resv2' is a GCC extension [-Werror=pedantic] > uint16_t resv2:5; > ^ > /root/dpdk/x86_64-native-linux-gcc/include/rte_higig.h:117:2: error: type of > bit-field 'hdr_ext_len' is a GCC extension [-Werror=pedantic] > uint16_t hdr_ext_len:3; > > and this is with gcc 4.8.5
>From >https://stackoverflow.com/questions/10906238/warning-when-using-bitfield-with-unsigned-char it seems that it is allowed in c99, so I guess it's a gcc 4.8 bug. Adding __extension__ above the struct solves the warnings, I suggest to add it. Olivier