typeof and bitfields

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


On Jan 13, 2005, at 7:12 PM, Matt Austern wrote:

> So given that "n" has a type, what's the rationale for saying that 
> users aren't allowed to look at that type using typeof?  The C++ 
> compiler knows that the type of that field is "int", and I can't think 
> of any reason why the C compiler shouldn't know that too.

The type is one bit size int which is different from int.
The patch which changed this is
<http://gcc.gnu.org/ml/gcc-patches/2004-03/msg01300.html>.

This patch describes the exact type and why this changed and where in 
the
C standard this is mentioned.

-- Pinski 



More information about the Gcc mailing list