https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85108
Bug ID: 85108
Summary: Incorrect warning for constexpr lambda with
-Wunused-but-set-variable
Product: gcc
Version: 7.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rain.backnet at gmail dot com
Target Milestone: ---
Created attachment 43791
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43791&action=edit
minimal test case
If a lambda is declared constexpr, and then used within another lambda, with
the flag -Wunused-but-set-variable the compiler produces an incorrect warning
that the constexpr lambda is set but not used, when it is.
See attached minimal test case.