[LLVMbugs] [Bug 12248] New: Lambda cannot change referenced local: "missing __block type specifier"
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Mar 12 01:47:16 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12248
Bug #: 12248
Summary: Lambda cannot change referenced local: "missing
__block type specifier"
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jonathan.sauer at gmx.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following code fragment fails to compile with clang r152548:
static void bar()
{
unsigned int result = 0;
auto l = [&]() { ++result; };
}
This results in:
$ ~/LLVM/build/Release+Asserts/bin/clang++ -std=c++0x -v clang.cpp
clang version 3.1 (trunk 152548)
Target: x86_64-apple-darwin10.8.0
Thread model: posix
[...]
clang.cpp:4:19: error: variable is not assignable (missing __block type
specifier)
auto l = [&]() { ++result; };
^ ~~~~~~
1 error generated.
This used to work in r151811.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list