site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Hi, class Foo { void Bar() { dispatch_block_t b = ^{ for (int i = 0; i < 10; i++) { } }; } }; The same blocks definition compiles as pure C : void Bar() { dispatch_block_t b = ^{ for (int i = 0; i < 10; i++) { } }; } Thanks. Stéphane Letz _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... We are experimenting with blocks in Snow Leopard and have the following error when compiling C++ code: test.cpp: In function ‘void __Bar_block_invoke_22(void*)’: test.cpp:1206: error: ‘int Foo::i’ is not a static member of ‘struct Foo’ test.cpp:1206: error: ‘i’ was not declared in this scope test: *** [all] Error 1 Are they any limitation for use of local variables in blocks when compiled in C++? This email sent to site_archiver@lists.apple.com