From: SourceForge.net <no...@so...> - 2006-10-06 08:51:29
|
Bugs item #1571231, was opened at 2006-10-05 11:40 Message generated for change (Settings changed) made by bernhardheld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1571231&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: msc51(8051) target Group: None Status: Open Resolution: None Priority: 5 Submitted By: miker (mike_robins) >Assigned to: Bernhard Held (bernhardheld) Summary: Integral promotion not performed Initial Comment: SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.0 #4309 (Jul 28 2006) (MINGW32) Using "sdcc -mmcs51 -S b.c" extern unsigned char x, y; char foo(void) { if (x + y != 0) { return 1; } return 0; } char bar(void) { if (x + y) { return 1; } return 0; } No errors or warnings are produced. Integral promotion is performed in foo(), but not in bar(). If x and y are both 0x80, foo() correctly returns 1 whereas bar() incorrectly returns 0. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1571231&group_id=599 |