c/9932: alignment of long long in struct seems to be wrong

bangerth@dealii.org bangerth@dealii.org
Tue Mar 4 15:30:00 GMT 2003


Old Synopsis: alignment of 64-bit type in struct seems to be wrong
New Synopsis: alignment of long long in struct seems to be wrong

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Tue Mar  4 15:30:49 2003
State-Changed-Why:
    This is indeed weird: 2.95 returns an alignment of 4,
    while subsequent compilers indicate 8 for long long:
    g/x> gcc x.c ; ./a.out
    12 16
    4 8 4
    g/x> /home/bangerth/bin/gcc-3.0.4/bin/gcc x.c ; ./a.out
    12 16
    4 8 8
    g/x>
    g/x>
    g/x> /home/bangerth/bin/gcc-3.2.2-pre/bin/gcc x.c ; ./a.out
    12 16
    4 8 8
    g/x> /home/bangerth/bin/gcc-3.3-pre/bin/gcc x.c ; ./a.out
    12 16
    4 8 8
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc x.c ; ./a.out
    12 16
    4 8 8
    
    icc7 returns 4 as well:
    g/x> icc x.c ; ./a.out
    12 16
    4 8 4
    
    Do you know whether there are formal specifications for
    x86 linux (an ABI) dictating the correct alignment?
    
    Wolfgang

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9932



More information about the Gcc-prs mailing list