[cfe-dev] memory layout compatibility between Clang and gcc

Welson Sun via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 25 22:10:48 PDT 2015


Thanks David, that's good to know.

A follow up question: if a struct type is coerced, how do I get the memory
layout (i.e. each field's offset) inside LLVM? It appears that the lowered
type has no reference to the original struct type?

On Thu, Sep 17, 2015 at 7:44 PM, David Majnemer <david.majnemer at gmail.com>
wrote:

>
>
> On Thu, Sep 17, 2015 at 3:43 PM, Welson Sun via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> Hi,
>>
>> I would like to get some confirmation/info/link regarding the memory
>> layout compatibility between Clang and gcc. Specifically, for the struct
>> and class construct. Default and when #pragma pack is used.
>>
>
> Clang and GCC are supposed to be compatible in this regard.  Any
> incompatibility is likely a bug in one of the two compilers.
>
>
>>
>>
>> Thanks,
>> - Welson
>>
>> --
>> - Welson
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>>
>


-- 
- Welson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150925/a6018d71/attachment.html>


More information about the cfe-dev mailing list