[Bug c++/60986] New: Wrong handling of const variables in lambda functions
physik3 at gmx dot net
gcc-bugzilla@gcc.gnu.org
Mon Apr 28 13:25:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60986
Bug ID: 60986
Summary: Wrong handling of const variables in lambda functions
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: physik3 at gmx dot net
The code in the attachment compiles, but behaves in a strange way. Output is
====
a = 42
b = 0
b = 0
b = 42
====
expected (and achieved if the function is not templated):
====
a = 42
b = 42
b = 42
b = 42
====
More information about the Gcc-bugs
mailing list