Article View: gnu.gcc.bug
Article #1537Bug in gcc-2.3.2 and double (ISC)
From: Bjoern Wennberg
Date: Mon, 14 Dec 1992 14:13
Date: Mon, 14 Dec 1992 14:13
44 lines
1312 bytes
1312 bytes
OS: Interactive-3.0 SYSVR3.2
COMPILER: gcc-2.3.2
DESCRIPTION OF BUG: gcc-2.3.2 doesn't handle doubles right:
Here is a small example which illustrates the problem:
input file: c.c
#include <stdio.h>
#include <float.h>
#include <math.h>
void main() {
double d = DBL_MAX;
printf("%G\n", d);
}
gcc gives wrong output:
# gcc-v
Reading specs from /usr/local/lib/gcc-lib/i486-isc/2.3.2/specs
gcc version 2.3.2
# gcc c.c
# a.out
INF
Using the native c-compiler gives the correct output:
# cc c.c
# a.out
1.79769E+308
Strange is that compiling with gcc-2.2.2 gives this:
#/global/gnu/bin/gcc -v
Reading specs from /global/gnu/lib/gcc-lib/isc/2.2.2/specs
gcc version 2.2.2
#/global/gnu/bin/gcc c.c
#a.out
1.79769E+308
Can someone please fix this ?
bjornw>
--
bjornw@edb.tih.no Bjoern Wennberg Trondheim College of Engeneering
Technical Details
Message-ID:
<1992Dec14.141342.5644@ugle.unit.no>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!colargol.edb.tih.no!bjornwShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!colargol.edb.tih.no!bjornw From: bjornw@colargol.edb.tih.no (Bjoern Wennberg) Subject: Bug in gcc-2.3.2 and double (ISC) Message-ID: <1992Dec14.141342.5644@ugle.unit.no> Sender: gnulists@ai.mit.edu Organization: Colargol, Trondheim College of Engineering Distribution: gnu Date: Mon, 14 Dec 1992 14:13:42 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 45