[cfe-commits] r55417 - in /cfe/trunk: include/clang/AST/ASTContext.h include/clang/AST/Type.h include/clang/Basic/DiagnosticKinds.def include/clang/Basic/LangOptions.h include/clang/Parse/DeclSpec.h lib/AST/ASTContext.cpp lib/AST/Type.cpp lib/AST

Eli Friedman eli.friedman at gmail.com
Wed Aug 27 18:52:50 PDT 2008

On Wed, Aug 27, 2008 at 5:59 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Wed, Aug 27, 2008 at 4:10 PM, steve naroff <snaroff at apple.com> wrote:
>> On Aug 27, 2008, at 5:17 PM, Eli Friedman wrote:
>>> On Wed, Aug 27, 2008 at 1:58 PM, steve naroff <snaroff at apple.com> wrote:
>>>> I think it's important to note that *many* language features (ObjC, many
>>>> GCC
>>>> extensions) don't have specifications (yet we've made forward progress,
>>>> using GCC as our reference implementation).
>>> I wasn't really trying to make a point about whether we need a
>>> specification for everything we implement.  The issue here is that, as
>>> far as I know, there isn't *any* documentation, *any* existing
>>> reference implementation, or even any reference to the existence of
>>> the "blocks" extension publicly available outside of this thread.
>> Apple shipped a developer preview version of GCC that implements blocks.
>> Since you aren't a registered Apple developer, you are unaware of this
>> (reference) implementation.
>> This is really just a simple issue of timing.
> Okay, so there is a reference implementation already... I wasn't aware
> of that.  It's still really difficult to review without any publicly
> available documentation, though.  (That said, I'm a little surprised I
> wasn't able to find anything online about it...)

Ah, I just got a pointer on IRC that llvm-gcc supports this
extension... that's good enough for getting a feel for it.

Basic example, if anyone else wants to try it out:

int a() {void (^x)(void) = ^{x();}; x();}


More information about the cfe-commits mailing list