This is a followup to a recent bug I submitted. It has
been fixed in 2.3.2, but unfortunately 2.3.2 seems to be
broken in the reverse direction.
The code bellow should generate a full 16-bit result due
to implicit integral promotion.
unsigned func ( unsigned char a, unsigned char b )
return a + b;
In 2.3.2 the promotion is not performed and the result is
incorrectly truncated to 8-bits.
Note: I remember seeing something in the
documentation about deliberately disabling implicit
integral promotion for efficiency reasons. I hope that I
am mistaken, because it would be a very very very bad
idea (tm). The correct way to address the issue of
efficiency is by using typecasts, not by breaking the
language (and lots of working code). At least, it should
be a compiler option.