On Mar 1, 2009, at 12:35 PM, Mike Stump wrote:
> On Mar 1, 2009, at 12:22 PM, Anders Carlsson wrote:
>> I did not! :) That's good news!
>>
>> However, __block variables are still allocated on the stack, even
>> when copied.
>
> And that is a private implementation detail you aren't allowed to
> know about, I believe. Can you write a testcase that can validly
> tell?
void (^f(void))(void)
{
__block int a;
return Block_copy(^{
a = 10;
});
}
void g()
{
f()();
}
is going to blow up because the returned block references a stack
variable that doesn't exist.
Anders
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits