2007-09-09 Richard Guenther <rguenther@suse.de>
Backport from mainline:
2007-05-07 Ian Lance Taylor <iant@google.com>
PR java/31842
* java/lang/natString.cc (_Jv_FormatInt): Avoid undefined signed
overflow.
From-SVN: r128306
+2007-09-09 Richard Guenther <rguenther@suse.de>
+
+ Backport from mainline:
+ 2007-05-07 Ian Lance Taylor <iant@google.com>
+
+ PR java/31842
+ * java/lang/natString.cc (_Jv_FormatInt): Avoid undefined signed
+ overflow.
+
2007-02-13 Release Manager
* GCC 4.1.2 released.
if (num < 0)
{
isNeg = true;
- num = -(num);
- if (num < 0)
+ if (num != (jint) -2147483648U)
+ num = -(num);
+ else
{
- // Must be MIN_VALUE, so handle this special case.
- // FIXME use 'unsigned jint' for num.
+ // Handle special case of MIN_VALUE.
*--ptr = '8';
num = 214748364;
}