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/014ccfcc1092
branches:  trunk
changeset: 378459:014ccfcc1092
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 ab1d7d51b427 -r 014ccfcc1092 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 @@ WARNS=                4
 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 ab1d7d51b427 -r 014ccfcc1092 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 @@ WARNS=                4
 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