Article View: gnu.gcc.bug
Article #611cross compilation floating point bug (minor)
From: Peter R. Ham
Date: Thu, 21 Sep 1989 18:50
Date: Thu, 21 Sep 1989 18:50
29 lines
1265 bytes
1265 bytes
This is minor, but I think a cleaner way to
initialize a floating point constant to zero
is as follows. The original code won't compile
unless the floating point type is a numeric C type.
In my cross compilation case, it is a structure.
*** c-convert.c Thu Sep 21 11:46:22 1989
--- ../dist/c-convert.c Mon Aug 7 17:04:38 1989
***************
*** 101,107 ****
{
register tree tem = make_node (REAL_CST);
TREE_TYPE (tem) = type;
! TREE_REAL_CST (tem) = REAL_VALUE_ATOF("0.0");
return tem;
}
}
--- 101,107 ----
{
register tree tem = make_node (REAL_CST);
TREE_TYPE (tem) = type;
! TREE_REAL_CST (tem) = 0;
return tem;
}
}
--
Peter Ham PO Box 3430 (h)(415) 324-9645
MS Computer Science Student Stanford, CA ham@polya.stanford.edu
Stanford University 94309 (o)(415) 723-2067
Technical Details
Message-ID:
<HAM.89Sep21115057@Neon.Stanford.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!shelby!polya!Polya.Stanford.EDU!hamShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!shelby!polya!Polya.Stanford.EDU!ham From: ham@Neon.Stanford.EDU (Peter R. Ham) Newsgroups: gnu.gcc.bug Subject: cross compilation floating point bug (minor) Message-ID: <HAM.89Sep21115057@Neon.Stanford.EDU> Date: 21 Sep 89 18:50:57 GMT Sender: USENET News System <news@Polya.Stanford.EDU> Distribution: gnu Organization: Stanford University Lines: 29