1 mar 2009 kl. 10.35 skrev Mike Stump:
> On Feb 28, 2009, at 5:45 PM, Anders Carlsson wrote:
>> +void t1()
>> +{
>> + __block int a;
>> + ^{ a = 10; }(); // expected-error {{cannot compile this block
>> expression with __block variables yet}}
>
> I believe this check is too expansive, in particular this works as
> expected.
__block variables don't work. For example
void f()
{
__block int a = 10;
^{
a = 20;
}();
printf("a is: %d\n", a);
}
does not work as expected.
Anders
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits