From f41c578fed688ad35d763283c9c68866a4a0becd Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Tue, 3 Jul 2018 10:51:59 +0000 Subject: [PATCH] Add GCC 8.1.0 compiler warning flags. Sponsored by: DARPA, AFRL --- share/mk/bsd.sys.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 6a56a554de0b..86a438676681 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -154,6 +154,16 @@ CWARNFLAGS+= -Wno-error=bool-operation \ -Wno-error=stringop-overflow .endif +# GCC 8.1.0 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100 +CWARNFLAGS+= -Wno-error=aggressive-loop-optimizations \ + -Wno-error=cast-function-type \ + -Wno-error=multistatement-macros \ + -Wno-error=restrict \ + -Wno-error=sizeof-pointer-memaccess \ + -Wno-error=stringop-truncation +.endif + # How to handle FreeBSD custom printf format specifiers. .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600 FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__