[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
test-stdalign.c breaks on i686 on Fedora Rawhide (gcc 4.7)
From: |
Richard W.M. Jones |
Subject: |
test-stdalign.c breaks on i686 on Fedora Rawhide (gcc 4.7) |
Date: |
Thu, 26 Jan 2012 23:34:04 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
CC test-stdalign.o
test-stdalign.c:70:1: error: static assertion failed: "verify (alignof
(int64_t) == offsetof (int64_t_helper, slot2))"
test-stdalign.c:73:1: error: static assertion failed: "verify (alignof (double)
== offsetof (double_helper, slot2))"
make[4]: *** [test-stdalign.o] Error 1
The code which fails is a macro that expands to:
typedef struct { char slot1; int64_t slot2; } int64_t_helper;
verify (alignof (int64_t) == offsetof (int64_t_helper, slot2));
/*...*/
typedef struct { char slot1; double slot2; } double_helper;
verify (alignof (double) == offsetof (double_helper, slot2));
I printed out the actual numbers and they are:
alignof (int64_t) = 8
offsetof (int64_t_helper, slot2) = 4
alignof (double) = 8
offsetof (double_helper, slot2) = 4
Compiler and kernel version:
gcc-4.7.0-0.9.fc17.i686
Linux fedorarawhidex32 2.6.38.6-27.fc15.i686.PAE #1 SMP Sun May 15 17:39:47
UTC 2011 i686 i686 i386 GNU/Linux
This is with the latest gnulib, updated this evening.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
- test-stdalign.c breaks on i686 on Fedora Rawhide (gcc 4.7),
Richard W.M. Jones <=