https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223
--- Comment #9 from Eric Gallager ---
(In reply to Federico Kircheis from comment #6)
> > are you expecting this to go under an existing warning flag, or a new one?
>
> Ideally -Wall, but there might already be some flags related to dangling
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223
--- Comment #8 from Federico Kircheis ---
> There is though, on line 10.
You are correct, I wonder how I could not see it.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223
--- Comment #7 from Jonathan Wakely ---
(In reply to Federico Kircheis from comment #6)
> That's true, but if you look at the assembly there is no function call to
> std::move,
There is though, on line 10.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223
--- Comment #6 from Federico Kircheis ---
> are you expecting this to go under an existing warning flag, or a new one?
Ideally -Wall, but there might already be some flags related to dangling
pointers and references.
> Your compiler explorer l
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223
--- Comment #5 from Jonathan Wakely ---
(In reply to Federico Kircheis from comment #0)
> Normally life-extension would kick in, but because we added an unnecessary
> static_cast, it does not kick in and v is a dangling reference.
I assume you
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223
--- Comment #4 from Jonathan Wakely ---
N.B AddressSanitizer will diagnose this at runtime.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223
Jonathan Wakely changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223
Eric Gallager changed:
What|Removed |Added
CC||egallager at gcc dot gnu.org
--- Commen