Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/modules/dtrace apply -Wno-error=array-bounds for GCC 10.



details:   https://anonhg.NetBSD.org/src/rev/1e8e446e03c8
branches:  trunk
changeset: 1020490:1e8e446e03c8
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Apr 13 19:16:51 2021 +0000

description:
apply -Wno-error=array-bounds for GCC 10.

these trigger "pointer to end of array" issues, and i'm not
entirely sure what is happening in the code generated for the
two "INDIR" system calls from syscalls.master.

diffstat:

 sys/modules/dtrace/netbsd32_syscall/Makefile |  1 +
 sys/modules/dtrace/syscall/Makefile          |  1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r 69e40d979182 -r 1e8e446e03c8 sys/modules/dtrace/netbsd32_syscall/Makefile
--- a/sys/modules/dtrace/netbsd32_syscall/Makefile      Tue Apr 13 13:18:50 2021 +0000
+++ b/sys/modules/dtrace/netbsd32_syscall/Makefile      Tue Apr 13 19:16:51 2021 +0000
@@ -16,6 +16,7 @@
 CPPFLAGS+=     -Wno-unknown-pragmas
 
 CPPFLAGS+=     ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+=     ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-error=array-bounds :}
 CPPFLAGS+=     ${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
 
 .include <bsd.kmodule.mk>
diff -r 69e40d979182 -r 1e8e446e03c8 sys/modules/dtrace/syscall/Makefile
--- a/sys/modules/dtrace/syscall/Makefile       Tue Apr 13 13:18:50 2021 +0000
+++ b/sys/modules/dtrace/syscall/Makefile       Tue Apr 13 19:16:51 2021 +0000
@@ -16,6 +16,7 @@
 CPPFLAGS+=     -Wno-unknown-pragmas
 
 CPPFLAGS+=     ${${ACTIVE_CC} == "gcc" :? -Wno-discarded-qualifiers :}
+CPPFLAGS+=     ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-error=array-bounds :}
 CPPFLAGS+=     ${${ACTIVE_CC} == "clang" :? -Wno-incompatible-pointer-types-discards-qualifiers :}
 
 .include <bsd.kmodule.mk>



Home | Main Index | Thread Index | Old Index