[cfe-dev] Tiny patch for va_list definition on x86-64 target

Abramo Bagnara abramobagnara at tin.it
Thu Jul 2 23:04:53 PDT 2009


Eli Friedman ha scritto:
> On Thu, Jul 2, 2009 at 4:08 PM, Abramo Bagnara<abramobagnara at tin.it> wrote:
>> - implicit casts:
>>
>>  va_list ap;
>>  va_start(ap, fmt);
>>  int i = va_arg(ap, fmt);
>>
>>  becomes:
>>
>>  va_list ap;
>>  __builtin_va_start((struct __va_list_tag*)(ap), fmt);
>>  int i = __builtin_va_arg((struct __va_list_tag*)(ap), int);
>>
>> - function types:
>>
>>  int (*fun)(const char *fmt, va_list args);
>>
>>  becomes:
>>
>>  int (*fun)(const char *, struct __va_list_tag*);
> 
> Neither of these examples prints in the indicated way using clang-cc
> -ast-print, but I guess you're using some customized code?

Only the latter is printed as you see above by clang-cc -ast-print as it
choose to not print implicit casts while our pretty printer works
differently.




More information about the cfe-dev mailing list