Posted Sep 16, 2009 20:51 UTC (Wed) by nteon (subscriber, #53899)
[Link]
recent llvm-gcc (available on Debian and other fine platforms) should have
blocks support built-in I believe. Clang as well. To actually _use_ blocks,
you need the BlocksRuntime shared library, available as part of compiler-rt [1]
(which builds and runs on Linux as of last week). Unfortunately I don't think
its packaged anywhere yet.
Posted Sep 16, 2009 20:54 UTC (Wed) by drag (subscriber, #31333)
[Link]
It would be what is required if you want GCD support for C++, I suppose.
Clang/LLVM does not support anything but C. For C++ you'd need GCC proper or GCC/LLVM. I beleive.
Blocks in C, not C++
Posted Sep 17, 2009 2:12 UTC (Thu) by jdahlin (subscriber, #14990)
[Link]
It supports both ObjC and C++, it may not support the standard as well as
GCC, but enough to compile a couple of small test programs. I'm confident
clang will deliver a C++ compiler reasonably compatible with GCC sometime
next year.
Blocks in C, not C++
Posted Sep 16, 2009 21:54 UTC (Wed) by ncm (subscriber, #165)
[Link]
If you're asking whether this "blocks" feature will be added to the Gcc C compiler, I would expect not until it gets very close to standardization as an ISO C feature. I don't know if Apple has placed this blocks thing before the C committee yet, or what the C committee thinks/would think of it. The GNU Gcc developers are very keen on observing relevant standards; proprietary features encourage lock-in. I doubt anybody would bother putting it in before that, given that the Clang C compiler has it.
Blocks in C, not C++
Posted Sep 16, 2009 22:46 UTC (Wed) by ncm (subscriber, #165)
[Link]
I will note further that the Lambda feature in C++ has different syntax from Blocks, and there will be strong pressure, particularly from implementers, on the C committee to match the C++ Lambda syntax, i.e. using "[]" where Apple's Blocks uses "^". (Ironically, "[]" looks typographically more like a block, and "^" looks more like a lambda.) I expect Apple to support both syntaxes in the end.
Blocks in C, not C++
Posted Sep 17, 2009 1:29 UTC (Thu) by busterb (subscriber, #560)
[Link]
But [] is used by objective C to call methods, so Apple is likely to not support this, at least not OS
X's most-supported language.
Blocks in C, not C++
Posted Sep 18, 2009 8:01 UTC (Fri) by marcH (subscriber, #57642)
[Link]
> The GNU Gcc developers are very keen on observing relevant standards; proprietary features encourage lock-in.