This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52023] _Alignof (double) yields wrong value on x86
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Jan 2012 21:13:29 +0000
- Subject: [Bug target/52023] _Alignof (double) yields wrong value on x86
- Auto-submitted: auto-generated
- References: <bug-52023-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-27 21:13:29 UTC ---
(In reply to comment #4)
It gets even worse with the following two structures:
struct
{
double d;
char i;
double d1;
int i1;
};
struct
{
char i;
double d;
char i1;
double d1;
};
The second one is packed into 4 byte alignment so the sizeof is 3*8 while the
first one is sizeof is 4*8. So powerpc-aix's alignof double depends on it is a
field or not and which field of the structure is first.