[Bug c++/114450] -Wunused-but-set-variable false positive of static variable initialized by a lambda used by a generic lambda

2024-03-24 Thread olof.gullnas at gmail dot com via Gcc-bugs
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 = []

[Bug c++/114450] -Wunused-but-set-variable false positive in lambda using another static auto lambda

2024-03-24 Thread olof.gullnas at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114450 --- Comment #1 from Olof Gullnäs --- This is observed on a Suse Linux X86 system

[Bug c++/114450] New: -Wunused-but-set-variable false positive in lambda using another static auto lambda

2024-03-24 Thread olof.gullnas at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114450 Bug ID: 114450 Summary: -Wunused-but-set-variable false positive in lambda using another static auto lambda Product: gcc Version: 13.2.1 Status: UNCONFIRMED Se