This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
From: Andrew Haley <aph@redhat.com> Why would that happen? Let's say we have a 32-bit timer that is getting near to overflow. b is 4294966796, say, and after the timer wraps round a is 100. 100 - 4294966796 == 600 (mod 2^32). The only problem will occur if the operands are promoted to a greater type before the subtraction is performed. An then we have a bug. :-)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |