From: SourceForge.net <no...@so...> - 2012-02-23 21:58:08
|
Bugs item #3489899, was opened at 2012-02-21 01:36 Message generated for change (Settings changed) made by epetrich You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3489899&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: C-Front End Group: fixed Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Woody (woody1234) >Assigned to: Erik Petrich (epetrich) Summary: incorrect unsigned 32-bit integer truncation Initial Comment: I am using an open source md5 c code. There are following defines: #define F(x, y, z) ((((y) ^ (z)) & (x)) ^ (z)) #define ROTATE_LEFT(x, n) rlc_32x8((x), (n)) #define FF(a, b, c, d, x, s, ac) \ {(a) += F ((b), (c), (d)) + (x) + (ULONG)(ac); \ (a) = ROTATE_LEFT ((a), (s)); \ (a) += (b); \ } Where ULONG is unsigned 32-bit integer. (#define ULONG unsigned long) It compiled ok with 3.0.0, but get "md5.c:313: warning 184: integer constant '3614090360' out of range, truncated to 2147483647." now. Version used: SDCC : mcs51/gbz80/z80/z180/r2k/ds390/pic16/pic14/TININative/ds400/hc08 3.1.2 #7 334 (Feb 20 2012) (MINGW32) md5.c attached. ---------------------------------------------------------------------- Comment By: Erik Petrich (epetrich) Date: 2012-02-22 01:35 Message: This seems to be a subtle difference between c89 and c99. sdcc should now correctly compile this when operating in c89 mode. If you add the "ul" suffix to the large decimal constants, it should work in either language mode Fixed in revision #7340 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3489899&group_id=599 |