https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109233
--- Comment #13 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Martin Liška from comment #7) > Note, the linux kernel disables the -Werror of the warning for GCC 11 and 12: > https://github.com/torvalds/linux/blob/ > a1effab7a3a35a837dd9d2b974a1bc4939df1ad5/init/Kconfig#L893-L904 > > while they still hope it can be enabled for GCC 13. This is a grep for "error:" in make allyesconfig compilation (make -k): ./include/linux/fortify-string.h:57:33: error: ‘__builtin_memcpy’ pointer overflow between offset 0 and size [-2147483648, -1] [-Werror=array-bounds=] ./include/linux/fortify-string.h:57:33: error: ‘__builtin_memcpy’ pointer overflow between offset 0 and size [-2147483648, -1] [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -50 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -64 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -63 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -62 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -52 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -51 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -61 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -60 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -59 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] fs/btrfs/sysfs.c:637:13: error: array subscript -57 is outside array bounds of ‘struct kobject[36028797018963967]’ [-Werror=array-bounds=] ./include/linux/fortify-string.h:57:33: error: array subscript ‘unsigned char[16][0]’ is partly outside array bounds of ‘u8[15]’ {aka ‘unsigned char[15]’} [-Werror=array-bounds=] drivers/net/ethernet/broadcom/tg3.c:17787:51: error: array subscript 5 is above array bounds of ‘struct tg3_napi[5]’ [-Werror=array-bounds=] drivers/net/ethernet/broadcom/tg3.c:17787:51: error: array subscript 5 is above array bounds of ‘struct tg3_napi[5]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:125:30: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[4]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:126:30: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[4]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:125:30: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:126:30: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:161:12: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:162:12: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:163:12: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:164:12: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[20]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:125:30: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[8]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:126:30: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[8]’ [-Werror=array-bounds=] drivers/net/wireless/ath/carl9170/cmd.c:220:12: error: array subscript ‘struct carl9170_cmd[0]’ is partly outside array bounds of ‘unsigned char[8]’ [-Werror=array-bounds=] drivers/media/tuners/mxl5005s.c:3429:72: error: array subscript 32 is above array bounds of ‘u16[25]’ {aka ‘short unsigned int[25]’} [-Werror=array-bounds=] drivers/media/tuners/mxl5005s.c:3448:70: error: array subscript 32 is above array bounds of ‘u16[25]’ {aka ‘short unsigned int[25]’} [-Werror=array-bounds=] drivers/hwmon/lm85.c:1110:26: error: array subscript [0, 31] is outside array bounds of ‘struct lm85_autofan[3]’ [-Werror=array-bounds=] drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c:641:42: error: array subscript 2 is above array bounds of ‘u32[2]’ {aka ‘unsigned int[2]’} [-Werror=array-bounds=] drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c:167:31: error: array subscript 4 is above array bounds of ‘const struct sparx5_psfp_gce[4]’ [-Werror=array-bounds=] drivers/infiniband/core/user_mad.c:564:50: error: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Werror=array-bounds=] drivers/infiniband/core/user_mad.c:566:42: error: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Werror=array-bounds=] drivers/infiniband/core/user_mad.c:618:25: error: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Werror=array-bounds=] drivers/infiniband/core/user_mad.c:622:44: error: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Werror=array-bounds=] drivers/infiniband/hw/bnxt_re/qplib_sp.c:229:29: error: array subscript 0 is outside array bounds of ‘struct bnxt_qplib_sgid_tbl[230584300921369395]’ [-Werror=array-bounds=] drivers/infiniband/hw/bnxt_re/qplib_sp.c:290:29: error: array subscript 0 is outside array bounds of ‘struct bnxt_qplib_sgid_tbl[230584300921369395]’ [-Werror=array-bounds=] drivers/platform/chrome/cros_ec_vbc.c:36:15: error: array subscript ‘struct ec_params_vbnvcontext[1]’ is partly outside array bounds of ‘unsigned char[36]’ [-Werror=array-bounds=] drivers/staging/rtl8712/rtl871x_xmit.c:949:40: error: array subscript 4 is outside array bounds of ‘void[448]’ [-Werror=array-bounds=] drivers/staging/rtl8712/rtl871x_xmit.c:950:39: error: array subscript 4 is outside array bounds of ‘void[448]’ [-Werror=array-bounds=]