[Bug libgcj/11666] New: GCJ generates 0 instead of the maximum integer
michael dot diloreto at hp dot com
gcc-bugzilla@gcc.gnu.org
Thu Jul 24 23:41:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11666
Summary: GCJ generates 0 instead of the maximum integer
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot diloreto at hp dot com
CC: gcc-bugs at gcc dot gnu dot org
When converting from a float value to an integer, if the float value is too
large, the result is 0 instead of the maximum integer. Here's the test.
class FloatBug {
public static void main ( String[] args ) {
int i = (int) 3.4e+32f;
System.out.println ( "(int) 3.4e+32f = " + i );
}
}
The answer should be 2147483647.
More information about the Gcc-bugs
mailing list