bsd.sys.mk: Add NO_WZERO_LENGTH_BOUNDS helper variable.

This variable expands to -Wno-zero-length-bounds on GCC 10+.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D37537
This commit is contained in:
John Baldwin 2022-12-04 16:29:55 -08:00
parent f4db390553
commit 9134d9265c

View File

@ -120,6 +120,9 @@ NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000
NO_WDEPRECATED_NON_PROTOTYPE=-Wno-deprecated-non-prototype
.endif
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 100100
NO_WZERO_LENGTH_BOUNDS= -Wno-zero-length-bounds
.endif
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 110100
NO_WARRAY_PARAMETER= -Wno-array-parameter
.endif