Re: uint64_t alignof odditity on x86

2009-06-16 Thread Ian Lance Taylor
Jan Engelhardt writes: > I noticed that __alignof__(uint64_t) will return 8, while > __alignof__(struct { uint64_t x; }) will give only 4. This > run on a typical 32-bit x86 CPU (GCC config below). > > What I am wondering about is why GCC was coded to give different > alignments here. If aligning

uint64_t alignof odditity on x86

2009-06-15 Thread Jan Engelhardt
Hi, I noticed that __alignof__(uint64_t) will return 8, while __alignof__(struct { uint64_t x; }) will give only 4. This run on a typical 32-bit x86 CPU (GCC config below). What I am wondering about is why GCC was coded to give different alignments here. If aligning a single uint64_t to a bounda