Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ethernet: bgmac: Remove -Warray-bounds exception

GCC-12 emits false positive -Warray-bounds warnings with
CONFIG_UBSAN_SHIFT (-fsanitize=shift). This is fixed in GCC 13[1],
and there is top-level Makefile logic to remove -Warray-bounds for
known-bad GCC versions staring with commit f0be87c42cbd ("gcc-12: disable
'-Warray-bounds' universally for now").

Remove the local work-around.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105679

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Kees Cook and committed by
David S. Miller
aabf6155 4af609b2

-5
-5
drivers/net/ethernet/broadcom/Makefile
··· 17 17 obj-$(CONFIG_BGMAC_PLATFORM) += bgmac-platform.o 18 18 obj-$(CONFIG_SYSTEMPORT) += bcmsysport.o 19 19 obj-$(CONFIG_BNXT) += bnxt/ 20 - 21 - # FIXME: temporarily silence -Warray-bounds on non W=1+ builds 22 - ifndef KBUILD_EXTRA_WARN 23 - CFLAGS_tg3.o += -Wno-array-bounds 24 - endif