git: 83a2c663b979 - stable/13 - bsd.sys.mk: Add NO_WDANGLING_POINTER helper variable.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 03 May 2023 00:29:30 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=83a2c663b97947047f10537f76bc30f35af2c0c8

commit 83a2c663b97947047f10537f76bc30f35af2c0c8
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-12-05 00:26:48 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-02 23:58:18 +0000

    bsd.sys.mk: Add NO_WDANGLING_POINTER helper variable.
    
    This variable expands to -Wno-dangling-pointer on GCC 12+.
    
    Reviewed by:    imp, emaste
    Differential Revision:  https://reviews.freebsd.org/D37532
    
    (cherry picked from commit ad96424e31a8c8c87fac8077fd4304c6fb133e25)
---
 share/mk/bsd.sys.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 4a75e17ed2b6..21aba9f010e0 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -135,6 +135,7 @@ NO_WARRAY_PARAMETER=	-Wno-array-parameter
 .endif
 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100
 NO_WUSE_AFTER_FREE=	-Wno-use-after-free
+NO_WDANGLING_POINTER=	-Wno-dangling-pointer
 .endif
 .endif # WARNS