[Bug c++/85109] New: Incorrect warning for constexpr lambda with -Wunused-but-set-variable
rain.backnet at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Mar 28 15:05:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85109
Bug ID: 85109
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 43792
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43792&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.
More information about the Gcc-bugs
mailing list