This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: m68k structure packing
- To: mrs at wrs dot com (Mike Stump)
- Subject: Re: m68k structure packing
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Tue, 30 Sep 1997 21:22:40 -0700
- cc: egcs at cygnus dot com
You are confusing the issues a bit. There is a real problem, and I have
already described it, see the PCC_BITFIELD_TYPE_MATTERS documentation.
It should be easy to reproduce this problem. Note that this problem has
nothing to do with your patch or structure packing which is where I think
you are getting confused.
My supposition was that your patch might cause this same problem to appear
when someone uses -fpack-struct because it is roughly equivalent to not
defining STRUCTURE_SIZE_BOUNDARY, and it is known that this case does fail.
This is the part that you haven't addressed. It would be useful if
you could show that your patch does not cause this problem, for instance
by showing that a testcase that does fail when STRUCTURE_SIZE_BOUNDARY is not
defined does not fail when -fpack-struct is used with your patch.
It is of course not possible for you to prove that your patch has no bugs,
but I haven't asked you to do that. All I have asked for is some evidence
that your patch does not accidentally trigger a known problem.
In any case, I am now leaning towards the opinion that the patch will work
OK, because gcc knows how to handle packed structures in general, so I will
stop bothering you about this. In fact, I am even starting to wonder if the
PCC_BITFIELD_TYPE_MATTERS problem still exists; it may be that the support
for unaligned structure fields is general enough that this problem doesn't
exist anymore.
Jim