typeof and bitfields
Matt Austern
austern@apple.com
Fri Jan 14 06:31:00 GMT 2005
On Jan 13, 2005, at 6:46 PM, Neil Booth wrote:
> Matt Austern wrote:-
>
>> I'm finding this discussion a little frustrating because I think there
>> is a good argument removing typeof for bit-field types but I haven't
>> seen that argument yet. I've seen a sort of summary of what that
>> argument might be, and I'm trying to fill in the gaps.
>
> Were the semantics of typeof on bitfields documented? It raises all
> kinds of questions. Such as do you get an integer type of a few bits,
> or the declared type? What if the declared type is int but the
> bitfield
> has type unsigned int?
>
> I think you need to decide semantics first.
You're right, of course. I'd been assuming that we needed up update
http://gcc.gnu.org/onlinedocs/gcc/Typeof.html#Typeof if we decided that
removing typeof for bit-fields was correct, but you're right that we
need to update it in either case.
(Not that this is the only way in which typeof is underspecified, but
that's a rant for another day.)
--Matt
More information about the Gcc
mailing list