[Bug c++/114450] -Wunused-but-set-variable false positive of static variable initialized by a lambda used by a generic lambda
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114450 --- Comment #4 from Olof Gullnäs --- (In reply to Andrew Pinski from comment #2) > Reduced testcase: > ``` > > template > void foreach(F f) {f(1);} > > void g () > { > static constexpr auto lambda_2 = [](int) { }; > auto lambda_1 = [](auto id) { lambda_2(id); }; > foreach(lambda_1); > } > ``` Nice reduction!
[Bug c++/114450] -Wunused-but-set-variable false positive of static variable initialized by a lambda used by a generic lambda
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114450 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed||2024-03-24 Status|UNCONFIRMED |NEW Blocks||89180 --- Comment #3 from Andrew Pinski --- Confirmed. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89180 [Bug 89180] [meta-bug] bogus/missing -Wunused warnings