mirror of
https://github.com/opnsense/src.git
synced 2026-04-24 23:57:30 -04:00
bsd.sys.mk: Disable -Wdangling-reference for GCC 13+
GCC raises this warning for libc++'s istream. It raises false
positives in other cases as well (GCC bugs 109640, 109642, 109671).
Warning from <istream>:
/usr/include/c++/v1/istream:1464:34: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
1464 | const ctype<_CharT>& __ct = std::use_facet<ctype<_CharT> >(__is.getloc());
| ^~~~
/usr/include/c++/v1/istream:1464:71: note: the temporary was destroyed at the end of the full expression 'std::__1::use_facet<ctype<char> >(std::__1::ios_base::getloc() const())'
1464 | const ctype<_CharT>& __ct = std::use_facet<ctype<_CharT> >(__is.getloc());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D42579
(cherry picked from commit 28fc837b70372a1a99c28ef4f74325bce711960a)
This commit is contained in:
parent
f7180e5d69
commit
c2d4e8d4e9
1 changed files with 7 additions and 0 deletions
|
|
@ -234,6 +234,13 @@ CXXWARNFLAGS+= -Wno-literal-suffix \
|
|||
-Wno-error=unknown-pragmas
|
||||
.endif
|
||||
|
||||
# GCC 13.1.0
|
||||
.if ${COMPILER_VERSION} >= 130100
|
||||
# These warnings are raised by headers in libc++ so are disabled
|
||||
# globally for all C++
|
||||
CXXWARNFLAGS+= -Wno-dangling-reference
|
||||
.endif
|
||||
|
||||
# GCC produces false positives for functions that switch on an
|
||||
# enum (GCC bug 87950)
|
||||
CWARNFLAGS+= -Wno-return-type
|
||||
|
|
|
|||
Loading…
Reference in a new issue