[cfe-commits] r68583 - in /cfe/trunk: lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGCall.cpp lib/CodeGen/CodeGenTypes.h test/CodeGen/blocks.c
Anders Carlsson
andersca at mac.com
Tue Apr 7 22:00:01 PDT 2009
7 apr 2009 kl. 21.55 skrev Eli Friedman:
> 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
Right, but hopefully sema will do the implicit casting to make up for
that (I might be wrong though :)
Anders
More information about the cfe-commits
mailing list