This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: typeof and bitfields
Andrew Pinski <pinskia@physics.uc.edu> writes:
| 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.
I think the real issue is not whether the type is int. But whether
"n" has a type. The answer is unambiguous: yes. typeof should report
that type.
The C standard allows integer types beyond those explicitly listed.
-- Gaby