[Bug c++/108165] -Wdangling-reference false positive
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 1 18:04:16 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108165
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Sorry, I'm not sure if the false positive in comment 0 can be fixed. I can't
simply compare the type of the temporary argument and the return type, because
we may be returning a subobject of the temporary argument, which is still
dangerous.
More information about the Gcc-bugs
mailing list