The great inapplicable attribute debate

Michel Fortin michel.fortin at michelf.com
Tue Apr 14 04:01:36 PDT 2009


On 2009-04-13 09:43:53 -0400, Frits van Bommel 
<fvbommel at REMwOVExCAPSs.nl> said:

> (How does this combine with the "D ABI" anyway? I know binary 
> compatibility between the different compilers is a bit of a pipe dream 
> at the moment, but the only way that could work would be to standardize 
> any and all shuffling of class fields...)

Interesting observation.

But you don't necessarily need to standardize the shuffling algorithm. 
If the offsets for fields in a class could be resolved at link time 
(the compiler could dump the offsets in the object file), then the 
linker could arange the final executable for any layout. The same could 
be done for virtual functions too, giving us a true non-fragile ABI 
capable of supporting changes in the order of member fields and 
functions.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list