On Sat, Jan 26, 2002 at 06:33:32PM -0800, Dave Carrigan wrote:
> Marco Pantaleoni <[EMAIL PROTECTED]> writes:
> 
> > Otherwise, as suggested by others, you can resort to #pragma to specify
> > packed structures, but this is not portable and I'd tend to consider
> > this one a bad programming practice.
> 
> I think that it's a horrible programming practice, and should not be
> encouraged. For portable programming in ANSI C, the compiler's decision
> on how it stores a struct should be considered as opaque, and the
> offsetof macro and sizeof operators should be the only two mechanisms
> that the programmer may use to glean meta-information about the struct.

Exactly. I mentioned that possibility only for the sake of completeness.

Marco

-- 
========================================================================
Marco Pantaleoni                                  [EMAIL PROTECTED]
Padova, Italy                                              [EMAIL PROTECTED]
elastiC language developer                   http://www.elasticworld.org

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to