http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47504
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org, | |kazu at gcc dot gnu.org --- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-16 23:34:25 UTC --- This is happening because convert_to_integer is doing what seems to me like an invalid transformation: it forces the arithmetic to be done in unsigned char, so we end up with char((unsigned char)-2), or char(254), which has implementation-defined behavior according to the C and C++ standards. This seems to have been introduced with the fix for PR 25125.