[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-10-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 --- Comment #9 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #8) > Giving a -Wdangling-ref warning for f7 and f9 is correct, s/f7 and f9/f9/

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-10-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 --- Comment #8 from Jonathan Wakely --- Giving a -Wdangling-ref warning for f7 and f9 is correct, but that warning is just based on simple heuristics in the front end. The -Wunitialized warning comes from the middle end and correctly detects a r

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-10-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 --- Comment #7 from Jonathan Wakely --- I think that's a completely separate issue.

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-10-02 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 --- Comment #6 from Arthur O'Dwyer --- Thanks, that looks much less noisy! (Assuming godbolt.org has updated already.) I now see this: // https://godbolt.org/z/WqT6hs8ed f3, f7, and f9 now all give -Wuninitialized at -O1 and higher (and false-

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-10-01 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 Jason Merrill changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|---

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-10-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 --- Comment #4 from GCC Commits --- The releases/gcc-14 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:47b205b4dcca8be98bff96ea6b6f80682c65a0b1 commit r14-10727-g47b205b4dcca8be98bff96ea6b6f80682c65a0b1 Author: Jason Merrill

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-09-24 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 Jason Merrill changed: What|Removed |Added Known to work||15.0 CC|

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-09-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 --- Comment #3 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:8733d5d3873977d6ca82d71b28728650f988e9c8 commit r15-3684-g8733d5d3873977d6ca82d71b28728650f988e9c8 Author: Jason Merrill Date: Su

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-08-02 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 --- Comment #2 from Marek Polacek --- I've moved -Wdangling-reference to -Wextra in r15-2703-g5ebfaf2d4994c1

[Bug c++/115361] "possibly dangling reference to a temporary" when object is_empty

2024-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115361 --- Comment #1 from Andrew Pinski --- GetKey() is the temporary in all cases.