Overzealous alignment and padding

Steve Summit scs at athena.mit.edu
Sun Oct 23 08:18:33 AEST 1988


In article <410 at sdrc.UUCP> scjones at sdrc.UUCP (Larry Jones) writes:
>I am looking for information about C compilers that are overzealous
>about aligning structure members and padding structures...
>it makes it impossible to declare a struct that
>conforms to some external format (e.g. records in a file)

As was discussed recently in this newsgroup, you can avoid all
structure arrangement problems by simply not attempting to
conform to external binary formats, but by using an external text
file format instead.  (Efficiency hackers find this solution
unpalatable, but the parse time and file size issues are often
not real problems in practice.)

                                            Steve Summit
                                            scs at adam.pika.mit.edu



More information about the Comp.lang.c mailing list