Re: Layout of Structs
Wed, 31 May 89 05:10:50 EDT

          From comp.compilers

Related articles
Layout of Structs (1989-05-28)
Re: Layout of Structs (1989-05-31)
Re: Layout of Structs (1989-06-02)
Re: Layout of Structs aglew@mcdurb.Urbana.Gould.COM (1989-06-04)
| List of all articles for this month |

Date: Wed, 31 May 89 05:10:50 EDT
Newsgroups: comp.compilers
In-Reply-To: <>
References: <>

>It is a Good Thing [tm] that structures are laid out in this way. As
>a hardware type, I often need to write device drivers. Being able to
>impose a structure onto a hardware memory map is a very useful thing,

Beware, however, that it is still possible for C structures to have
unnamed holes in them more or less wherever the compiler pleases. C
does *not* give you complete control of storage layout, and never has,
although in many compilers you can do pretty much what you want at the
price of having your code depend on assumptions about the compiler.

Case in point: on a 68020, are longs 16-bit aligned or 32-bit aligned?
Compilers differ.

                                                                          Henry Spencer at U of Toronto Zoology

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.