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

Hagen Last hagen@equator.com
Tue Mar 4 18:06:00 GMT 2003


The following reply was made to PR c/9932; it has been noted by GNATS.

From: Hagen Last <hagen@equator.com>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org,  hagen@equator.com, gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: c/9932: alignment of long long in struct seems to be wrong
Date: 04 Mar 2003 09:39:11 -0800

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9932
 
 I don't know if there is a formal specification for the correct
 alignment of 64-bit data types on x86 linux. I think that's up to the
 compiler (I was actually told by one of our compiler guys that I should
 not assume anything about alignment of data types).
 
 But from what I understand structs must be aligned to the largest
 alignment of its members. So, if the alignment of a 64-bit type is 8
 (for a specific compiler) then it must also align a struct that has a
 member of this data type to (at least) 8.
 
 Hagen.
 



More information about the Gcc-prs mailing list