[Bug c++/108165] -Wdangling-reference false positive

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Dec 18 17:46:40 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108165

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So at the warning is not flow sensitive at all and does not take into account
the definition of f; only the call location of f is taken into account.

In this case, the call site of f has a temporary and the warning is saying
possibly because a temporary is made in the call arguments of f.


More information about the Gcc-bugs mailing list