This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: structure members of packed structures
- From: Dale Johannesen <dalej at apple dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, Mark Mitchell <mark at codesourcery dot com>, Nathan Sidwell <nathan at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 15 Jul 2003 16:54:37 -0700
- Subject: Re: structure members of packed structures
On Tuesday, July 15, 2003, at 03:59 PM, Richard Henderson wrote:
On Mon, Jul 14, 2003 at 02:50:00PM -0700, Dale Johannesen wrote:
Contingent on STRICT_ALIGNMENT, please. Unaligned accesses are not
a problem on all architectures.
I strongly do not think we should make the legality of the & operator
contingent on STRICT_ALIGNMENT. All the world's an x86,
Not yet, mister.:)
and everyone
else will suffer if you do this.
But you have a point.
Personally, I have no problem with the address being taken and giving
SIGBUS when used (or, gasp, fixed up by UAC fault software).
This, IMO, is one of those "well don't do that then" sorts of problems.
That's fine with me, but then it would be.
We do have actual users who have packed structs containing misaligned
fields, and want the misaligned memory refs. Not sure about & but they
would certainly expect it to work.