http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49896

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-10-09
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2011-10-09 
21:06:34 UTC ---
(In reply to comment #6)

Right.  I was surprised by this, but conversion of out-of-range values between
integral types is treated differently in the standard from overflow in
arithmetic operations.

4.7:

If the destination type is signed, the value is unchanged if it can be
represented in the destination type (and bit-field width); otherwise, the value
is implementation-defined.

So, the testcase is OK.  I think this bug is actually closely related to 49855,
as the fix for that bug also fixes this one for me.

Reply via email to