This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testcase] Failure with new bitfield patch (was Re: [RFA] Fix type of bitfields)
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Feb 2002 18:49:29 +0000
- Subject: Re: [testcase] Failure with new bitfield patch (was Re: [RFA] Fix type of bitfields)
- References: <20020128214305.GA27635@daikokuya.demon.co.uk> <20020201153420.O618@sunsite.ms.mff.cuni.cz>
Jakub Jelinek wrote:-
> Unfortunately, this patch breaks ABI seriously (e.g. tons of hardware
> drivers will stop working).
Ugh. I think I should revert the patch.
> ATM struct A will be 3 bytes wide while it used to be 2 bytes wide.
> The problem is that with your patch at place_field time field b
> has unsigned char type (while it used to have unsigned short type),
It shouldn't have unsigned char type. It should have type "unsigned
integer of 5 bits" for struct A. If it doesn't, then I'm confused.
My understanding of the integer types of GCC is that they are fully
specified by their signedness and their width.
> Now, cannot the field types be changed in finish_struct after they all have
> been placed instead of changing them early?
Possibly; I think doing it earlier is what broke the debug stuff for
enums, though I'm not sure as I've not had time to investigate.
Does your question mean that declaring a bitfield of type "unsigned
char:3" and another of "unsigned short: 3" should give them different
types? If so, then we need to store that information somewhere; possibly
in the "type" field of the common part of the tree_type?
Neil.