This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: PR 26534
Joseph S. Myers wrote:
> On Sun, 23 Apr 2006, Mark Mitchell wrote:
>
>> that the type of "x.i" be "int". When "x.i" is used in an rvalue
>> context, we convert it to the declared type; the middle end should be
>
> Properly, this should be converting to the declared type for a bit-field
> strictly wider than int or one of enumerated type, otherwise to either int
> or unsigned int depending on whether int can represent all values of the
> bit-field; [conv.prom] paragraph 3 and bug 16376.
Yes, the integral promotions will happen as well, at a later stage. So,
for something like "short i : 3", "x.i" will first be converted to
"short", and then it will be promoted to "int".
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713