> Actually no.  In 32-bit mode, double is aligned on a 4 byte boundary, not an 8
> byte boundary, unless you use -malign-double, which breaks the ABI.  This has
> been a 'feature' of the original AT&T 386 System V ABI that Linux uses for
> 32-bit x86 processors.  With the SCO mess, it may be hard to ever change that
> ABI....

My gcc doesn't agree with you (I actually checked before posting)

~> cat t.c

int main(void)
{
        double x;
        printf("%d\n", __alignof__(x));
        return 0;
}
~> gcc -m32 -o t t.c
t.c: In function ‘main’:
t.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
~> ./t
8
~> 

-Andi

Reply via email to