[Bug c++/105571] Spurious "set but not used" on static constexpr local, used in lambda

2022-09-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105571 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/105571] Spurious "set but not used" on static constexpr local, used in lambda

2022-05-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105571 --- Comment #2 from Johel Ernesto Guerrero Peña --- Simplified reproducer from Bug 105743: See https://godbolt.org/z/xq16xac15. ```C++ void f(auto x) { x(0); } void g() { static constexpr auto h = [](...) { }; f([](auto x) { h(x); }); }

[Bug c++/105571] Spurious "set but not used" on static constexpr local, used in lambda

2022-05-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105571 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com