[cfe-commits] r68583 - in /cfe/trunk: lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGCall.cpp lib/CodeGen/CodeGenTypes.h test/CodeGen/blocks.c

Eli Friedman eli.friedman at gmail.com
Tue Apr 7 21:55:08 PDT 2009


On Tue, Apr 7, 2009 at 9:28 PM, Anders Carlsson <andersca at mac.com> wrote:
>
> 7 apr 2009 kl. 20.04 skrev Eli Friedman:
>
>> On Tue, Apr 7, 2009 at 7:56 PM, Anders Carlsson <andersca at mac.com> wrote:
>>>
>>>  // Cast the function pointer to the right type.
>>>  const llvm::Type *BlockFTy =
>>> -    CGM.getTypes().GetFunctionType(FnInfo, IsVariadic);
>>> +    CGM.getTypes().GetFunctionType(FnInfo, false);
>>
>> Should Sema be returning an error for "int (^a)(int x,...) = ^(int
>> x,...) { return x; };"?
>
> Hmm, why?
>
> (The code change I made was for when you call blocks).

The calling conventions for varargs and non-varargs functions aren't
necessarily compatible.

-Eli




More information about the cfe-commits mailing list