How to make the address of varients are assigned immediately in the memory?
Tim Prince
tprince@computer.org
Thu May 17 06:44:00 GMT 2001
This message is hardly suitable for any of the lists to which you cross
posted, even if you had posted in text rather than html. gcc-help might
be appropriate. If you wish to avoid padding within your structures,
you could follow the traditional approach of setting the fields in
decreasing order of size {long, short, short, short}, or read up on the
non-portable pack declarations which gcc has to deal with this.
----- Original Message -----
From: Elva Wang
To: gcc_bugs@gcc.gnu.org ; bug_gcc@gnu.org ; gcc@gcc.gnu.org
Sent: Friday, May 18, 2001 3:23 AM
Subject: How to make the address of varients are assigned immediately in
the memory?
Hi,gcc groups:
what configurations or options can make the compiler assigned
sequential memory for short and long type data defined immediatly.
For instance, I defined a structure {short,long ,short,short},if I
only use gcc to compile the c file.
the memory size of the struture is 12 bytes, not 10 bytes. This means
the memory block is not full occupied. How can I make it full occupied.
Best Regards!
Elva Wang
More information about the Gcc
mailing list