bsd.sys.mk: Add NO_WUSE_AFTER_FREE helper variable.

This variable expands to -Wno-use-after-free on GCC 12+.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D36817
This commit is contained in:
John Baldwin 2022-10-03 16:10:42 -07:00
parent 3b887005b4
commit 67b0751249

View file

@ -117,6 +117,9 @@ NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 110100
NO_WARRAY_PARAMETER= -Wno-array-parameter
.endif
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100
NO_WUSE_AFTER_FREE= -Wno-use-after-free
.endif
.endif # WARNS
.if defined(FORMAT_AUDIT)