[cfe-commits] r70098 - in /cfe/trunk: lib/CodeGen/CGDecl.cpp test/CodeGen/attr-cleanup.c

Eli Friedman eli.friedman at gmail.com
Sat Apr 25 18:38:46 PDT 2009


On Sat, Apr 25, 2009 at 6:35 PM, Anders Carlsson <andersca at mac.com> wrote:
>
> 25 apr 2009 kl. 18.30 skrev Eli Friedman:
>
>> On Sat, Apr 25, 2009 at 5:34 PM, Anders Carlsson <andersca at mac.com> wrote:
>>>
>>> +    // In some cases, the type of the function argument will be
>>> different from
>>> +    // the type of the pointer. An example of this is
>>> +    // void f(void* arg);
>>> +    // __attribute__((cleanup(f))) void *g;
>>> +    //
>>> +    // To fix this we insert a bitcast here.
>>
>> Bitcasting isn't quite right... take the following testcase:
>> void c4(_Bool a);
>> void t4() {
>>  __attribute((cleanup(c4))) void* g;
>> }
>>
>
> Sema will catch that before it gets to codegen:

I just fixed that; it was clearly an accident that it was being rejected.

-Eli




More information about the cfe-commits mailing list