[Bug target/35634] [avr] result of char promotion comes out of CHAR_MIN/MAX
schwab at suse dot de
gcc-bugzilla@gcc.gnu.org
Wed Mar 19 09:57:00 GMT 2008
------- Comment #3 from schwab at suse dot de 2008-03-19 09:56 -------
Actually, there is no undefined behaviour here, as long as CHAR_MAX < INT_MAX
no overflow occurs. c++ is the same as c = (int)c + 1 (when ignoring the
result), and the conversion from int to char is implementation defined. For
gcc the result of such a conversion is always in the range of the target type.
--
schwab at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35634
More information about the Gcc-bugs
mailing list