Subject: Re: [boost] Silent change in boost 1.36 alignment_of<> template with gcc 4.3
From: Jon Biggar (jon_at_[hidden])
Date: 2008-11-10 12:06:44
Giovanni Piero Deretta wrote:
>> I'm becoming convinced that we just shouldn't us the __alignof__() builtin
>> from gcc because it lies.
> I wouldn't say it likes; from gcc __alignof__ docs:
> " Some machines never actually require alignment; they allow reference
> to any data type even at an odd address. For these machines,
> `__alignof__' reports the _recommended_ alignment of a type."
> x86 is one of those machines (no alignment ever required except for
> some XMM instructions). The recommended alignment for double is 8
> bytes, even if the ABI, for historical reason only requires 4.
I say it lies because the result is useless for structure alignment
-- Jon Biggar jon_at_[hidden] jon_at_[hidden]
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk