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.