https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69730
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- I wonder if it would be possible to warn about this. -Wreturn-local-addr does not trigger because the reference is ok. It is the object which is temporary, but that may be hard to detect.