Subject: Re: structure alignment on arm in NetBSD? (resend without html)
To: None <tech-toolchain@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 10/17/2007 13:54:12
> Either by __attribute__((__packed__)) or by not using a struct.
The latter is the most abstractly right choice; there is nthing about
the C language per se that requires it to be possible to match an
externally-specified memory layout with a struct definition. Depending
on a particular struct to match an independently-specified memory
layout, to my mind, borders on "unwarranted chumminess with the
However, C was designed as an OS implementation language, and, as such,
implementations of it really ought to make this kind of thing possible.
So I suppose it depends on to what extent we're willing to make our OS
depend on how well the compiler does at that. As long as we're using
an external compiler, this will be running a risk....
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML firstname.lastname@example.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B