[Bug c++/114225] False positive -Werror=dangling-reference

2024-03-04 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114225 --- Comment #4 from Fedor Chelnokov --- Ok. At the same time we see that some false positives of this warning are fixed in Trunk, e.g. struct A { int i; }; struct Getter { const A * a; const int & value() const { return a->i; } };

[Bug c++/114225] False positive -Werror=dangling-reference

2024-03-04 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114225 --- Comment #3 from Xi Ruoyao --- (In reply to Fedor Chelnokov from comment #2) > Please note that this is a regression in GCC 13. GCC 12 (or other compilers) > do not show a warning here: https://godbolt.org/z/Yhfad47xs No, GCC 12 does not hav

[Bug c++/114225] False positive -Werror=dangling-reference

2024-03-04 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114225 --- Comment #2 from Fedor Chelnokov --- Please note that this is a regression in GCC 13. GCC 12 (or other compilers) do not show a warning here: https://godbolt.org/z/Yhfad47xs

[Bug c++/114225] False positive -Werror=dangling-reference

2024-03-04 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114225 Xi Ruoyao changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---