[cfe-commits] r55767 - in /cfe/trunk: include/clang/AST/ASTContext.h include/clang/Basic/DiagnosticKinds.def lib/AST/ASTContext.cpp lib/Sema/Sema.h lib/Sema/SemaExpr.cpp

Eli Friedman eli.friedman at gmail.com
Thu Sep 4 18:14:24 PDT 2008


On Thu, Sep 4, 2008 at 4:58 PM, Mike Stump <mrs at apple.com> wrote:
> On Sep 4, 2008, at 12:14 PM, Eli Friedman wrote:
>>>
>>> +    /// BlockVoidPointer - The assignment is between a closure pointer
>>> and
>>> +    /// void*, we accept for now.
>>
>> I don't see any good reason to accept this; it'll just destroy the block
>> pointer.
>
> void * is the canonical opaque type, and block pointers can be pushed into
> and pulled out of a void * per the usual C rules.

Erm, nevermind about that one.  Not sure what I was thinking.

>> The code as-is won't work correctly for cases like
>
>> "int a(int(^b)(void)){return b  == (void*)0}".
>
> gcc does this:
[snip]
> clang should do something similar when done.

The issue is that clang currently gives an error on the given sample.

-Eli



More information about the cfe-commits mailing list