HomeFreeBSD

bsd.sys.mk: Disable -Wdangling-reference for GCC 13+

Description

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)

Details

Provenance
jhbAuthored on Nov 15 2023, 2:35 AM
Reviewer
imp
Differential Revision
D42579: bsd.sys.mk: Disable -Wdangling-reference for GCC 13+
Parents
rGf7180e5d69cd: libgpio: Fix type mismatch for gpio_pin_[gs]et
Branches
Unknown
Tags
Unknown