On Fri, Jun 5, 2009 at 5:30 PM, Ian Lance Taylor<iant@xxxxxxxxxx> 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. Yuck -- I see your point. But, there could still be a commandline switch to pack all structs (like -Os, but for data). No, I don't expect anyone to actually create this anytime soon, but it would be a handy tool for manycore optimization endeavors. > > 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. Yes, clearly. > > Ian >