Mail Archives: djgpp/1995/07/28/11:24:05
On Fri, 28 Jul 1995, A.Appleyard wrote:
> Why not pack structs etc anyway by default? On a PC, (rounding every member's
> width to a multiple of 2 or 4 bytes) achieves nothing except wasting store and
> annoying people who want to make a struct match some assembly-coded table (as
> e.g. when calling some interrupts).
This is not true. There is a considerable penalty on a 486 or better CPU
for unaligned accesses, so even on a PC struct padding makes a lot of
sense. However, if you want this feature to be the default, you can edit
your lib/specs file and add this switch. (You should recompile the
library before you can link your programs compiled with that switch, and
anyway we don't have Gcc 2.7.x yet.)
- Raw text -