[Bug c++/102223] no warning when calling member function on dangling reference

2024-06-12 Thread egallager at gcc dot gnu.org via Gcc-bugs
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 >

[Bug c++/102223] no warning when calling member function on dangling reference

2021-09-28 Thread federico.kircheis at gmail dot com via Gcc-bugs
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.

[Bug c++/102223] no warning when calling member function on dangling reference

2021-09-08 Thread redi at gcc dot gnu.org via Gcc-bugs
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.

[Bug c++/102223] no warning when calling member function on dangling reference

2021-09-08 Thread federico.kircheis at gmail dot com via Gcc-bugs
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

[Bug c++/102223] no warning when calling member function on dangling reference

2021-09-08 Thread redi at gcc dot gnu.org via Gcc-bugs
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

[Bug c++/102223] no warning when calling member function on dangling reference

2021-09-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223 --- Comment #4 from Jonathan Wakely --- N.B AddressSanitizer will diagnose this at runtime.

[Bug c++/102223] no warning when calling member function on dangling reference

2021-09-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223 Jonathan Wakely changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/102223] no warning when calling member function on dangling reference

2021-09-07 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102223 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Commen