From: <no...@so...> - 2002-12-28 15:25:46
|
Bugs item #658540, was opened at 2002-12-25 23:49 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=658540&group_id=599 Category: Icode generator >Group: fixed >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Tzvetan Mikov (mikov) >Assigned to: Johan Knol (johanknol) Summary: implicit integral promotion not working Initial Comment: 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. ---------------------------------------------------------------------- >Comment By: Johan Knol (johanknol) Date: 2002-12-28 15:25 Message: Logged In: YES user_id=63512 fixed in SDCCast.c:1.150 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=658540&group_id=599 |