This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: m68k structure packing


	> Gcc knows that it needs to access bitfields differently when a structure
	> is packed.  It may be that gcc will generate correct code with your patch
	> for cases that would ordinarily fail ...

	Yes it will.  I've used this on a number of occasions to get
	machine independant unaligned loads.  It works on all machines,
	even if gcc has to resort to byte loads and shifts.

I know that bitfield references to packed structures work.  This has never
been in doubt.

However, there remains a specific question here as to how this affects the
m68k port with respect to the known and documented problems with
PCC_BITFIELD_TYPE_MATTERS and STRUCTURE_SIZE_BOUNDARY.  It is not obvious
what the interaction is.  But as I mentioned in my previous mail, I am starting
to suspect that improvements to the unaligned/packed structure field support
over the years has accidentally solved this known problem, in which case this
may now be a `historical' problem.  If you haven't done so already, and if
you really care about this problem, take a look at the
PCC_BITFIELD_TYPE_MATTERS documentation.

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]