typeof and bitfields

Andrew Pinski pinskia@physics.uc.edu
Fri Jan 14 00:15:00 GMT 2005


On Jan 13, 2005, at 6:56 PM, Matt Austern wrote:

> This was obviously a deliberate change.  However, I don't see any 
> mention about it in the part of the manual that documents typeof.  I 
> also can't guess why this should be different in C and in C++, or what 
> the rationale for the change might have been in the first place.  
> Sure, applying sizeof or alignof to a bit-field makes no sense.  But 
> typeof?  X::n has a perfectly good type, as the C++ compiler 
> understands.

The type of a bit-field is no longer the under lying type.  But the
correct type which is required by the C standard.

-- Pinski



More information about the Gcc mailing list