[cfe-dev] Force __builtin_va_list to be a char* in any architecture?

Mikhail Ramalho via cfe-dev cfe-dev at lists.llvm.org
Thu Dec 12 09:14:16 PST 2019

Hi all,

Is there any way to force __builtin_va_list to always be a char*,
regardless of the architecture?

We are using clang as a frontend in our project and our analysis relies on
the fact that __builtin_va_list is a char* on 64 bits architecture as well,
but we keep getting:

|-TypedefDecl 0x4148c78 <<invalid sloc>> <invalid sloc> implicit referenced
__builtin_va_list 'struct __va_list_tag [1]'
| `-ConstantArrayType 0x4148c20 'struct __va_list_tag [1]' 1
|   `-RecordType 0x4148aa0 'struct __va_list_tag'
|     `-Record 0x4148a10 '__va_list_tag'

I've tried several different combinations of defines but to no avail.

In case it is not possible, we could submit a patch to add an option to
force that on clang. A bit of an overkill given that we would be the only
users (I think).



Mikhail Ramalho.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191212/98c1d6d6/attachment.html>

More information about the cfe-dev mailing list