This is the mail archive of the
mailing list for the GCC project.
Re: typeof and bitfields
- From: Paul Schlie <schlie at comcast dot net>
- To: <gdr at integrable-solutions dot net>
- Cc: <gcc at gcc dot gnu dot org>,'Ian Lance Taylor' <ian at airs dot com>,'Neil Booth' <neil at daikokuya dot co dot uk>,'Matt Austern' <austern at apple dot com>,'Andrew Pinski' <pinskia at physics dot uc dot edu>,Dave Korn <dave dot korn at artimi dot com>
- Date: Fri, 14 Jan 2005 13:26:25 -0500
- Subject: Re: typeof and bitfields
> Gabriel Dos Reis writes:
> That is an argument for not returning an int. It is not an argument
> for issueing error. Why not return int_with_2bits?
Actually the notion of returning "signed/unsigned:N" type seems like a good
idea, which seems consistent with the intent of the specification,
especially if the result may be used to consistently to declare/cast that
bit-field type; and where then sizeof, as it's defined to yield number of
bytes, only makes sense if it consistently yields the smallest integer size
supported on the target equal to or greater than the bit-fields specified
size (as no other result seems reasonable or useful)?