Re: Bloated Struct Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian Lance Taylor wrote:
> ". ." <pkejjy@xxxxxxxxx> writes:
> 
>> (In other words, I think the default for x86(-64) should be packed,
>> but I'll leave it to others to have that flame war.)
> 
> The ABI can not change.  Changing that now would prevent linking object
> files compiler by different compilers together safely, as they would use
> different offsets for accessing struct fields.
> 
> In any case, different programs have different tradeoffs here.  Some
> programs prefer the faster access of aligned fields, some programs
> prefer the reduced memory usage of packed fiels.  No single default can
> be satisfactory for everybody, but nevertheless there must be a default.

Of course if the code is C++, there is no reason to worry about linking
object files from different compilers.  It is currently a pipe dream.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux