Why is the ABI for structs different between Linux and Windows?

Robert Fraser fraserofthenight at gmail.com
Sat May 17 13:14:28 PDT 2008


Walter Bright wrote:
> Robert Fraser wrote:
>> Walter Bright wrote:
>>> The struct ABI is designed to be compatible with the C struct 
>>> behavior for the local C compiler.
>>
>> Is it possible to just use this behavior for extern(C) structs while 
>> structs with D linkage use the Windows behavior on Linux, too?
> 
> Why do that? You can control the layout with the align attribute, if 
> need be.

How would that allow an 8-byte struct to be passed in registers on Linux?



More information about the Digitalmars-d mailing list