This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH: PR 26534


On Sun, 23 Apr 2006, Mark Mitchell wrote:

> 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".

Equally, "unsigned long i : 3" should also be promoted to int, not 
unsigned long.  Now, Andrew Pinski is reporting that this patch is indeed 
fixing bug 16376, whether or not intended to do so.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]