Un-alignment in structures

sde at Mitre-Bedford sde at Mitre-Bedford
Tue Apr 2 02:36:11 AEST 1985


   |>How about adding keyword(s) 'aligned/unaligned' to deal with the pointer
   |>alignment question?  Of course, it would help to be able to specify a
   |>general (un)alignment default.
   |
   |Ugh!  The last thing we need is a couple more keywords.  How about adding
   |it as a compiler option.  The '-f' option would tell the compiler to
   |optimize code for fast running (ie, do alignment of structures so you can
   |access their elements fast), otherwise make the code small (don't pad
   |structures to save space).  Adding two new keywords seems rather
   |unnecessary.
   |--
   |	Curt Sampson		ihnp4!alberta!jeff

And how would the compiler option know which structures &/or sub-structures
are to be aligned and which are to be packed? (But if the comment was only on
the question of "...default", then "... TWO new keyowrds " is not correct.
Also, it would be nice to be able to treat such a default as similar to
conditional compilation, so that for debugging purposes, a section's default
could be changed to determine if a problem lay therein. This certainly could
not be done by compiler options ( even though, to grant you a point, you could
do somthing like 'cc -.. <structname>," or whatever, assuming arbitrarily
long command length).

David Eisenberg   sde at mitre-bedford



More information about the Comp.lang.c mailing list