This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: __alignof__(void)


On Tue, 8 Sep 1998, Nathan Sidwell wrote:

: IMHO a useful value to return would be the maximum alignment for any
: type.

So how do you determine this `maximum alignment' in a MI fashion?
This would have to be a MD hack at best.

: on my sparc box, the output curently is
: 	char 1 int 4 void 1
: 	char 1 int 4 void 1
: but would change to
: 	char 1 int 4 void 8
: 	char 1 int 4 void 8

...And for LP64 SPARC, it would need to be "16", as doubles are 16-byte
aligned even though "long long" is only 8 bytes.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]