This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc align.
- To: <gcc at gcc dot gnu dot org>
- Subject: gcc align.
- From: "RenWei" <renwei at huawei dot com>
- Date: Wed, 8 Nov 2000 19:43:03 +0800
hi ,
i want to use __attribute__ ((aligned(x)))
on some pIII , RedHat 6.2 box.
my problem is:
1.
i use this
struct {
char a ;
unsigned short b;
char c;
} me __attribute__((aligned(4))) ;
and
struct {
char a ;
unsigned short b;
char c;
} me2;
i print the size of me and me2, but their size is the same . I want me
align in 4 bytes, how to get it?
2.
i want all the struct in some c file align in 4 bytes, but if i use
__attribute__, it only works in one struct.
how can i do this in gcc ?
thanks
renwei.