This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

internal compiler error with float=static_cast<float>(string)


Hi,

Here's a little bug report.

Thanks,
Charlie

// bug.cc: Program to demonstrate egcs-1.0.3 internal compiler error
// g++ -o bug bug.cc
#include <iostream>
#include <string>
main(){
  string flt_sng("1.23e-45");
  float flt_foo=static_cast<float>(flt_sng);
  cout << "flt_sng = " << flt_sng << ", flt_foo = " << flt_foo << endl;
}

/home/zender/c: uname -a
Linux z 2.0.32 #1 Wed Nov 19 00:46:45 EST 1997 i686 unknown
/home/zender/c: g++ --version
egcs-2.90.29 980515 (egcs-1.0.3 release)
/home/zender/c: g++ -o bug bug.cc
bug.cc: In function `int main()':
bug.cc:7: Internal compiler error.
bug.cc:7: Please submit a full bug report to `egcs-bugs@cygnus.com'.

-- 
Charlie Zender        Voice: (303) 497-1612, FAX: 497-1324 
NCAR ASP & CGD        E-mail: zender@ncar.ucar.edu
P.O. Box 3000         URL: http://www.cgd.ucar.edu/cms/zender
Boulder CO 80307-3000 PGP: finger -l zender@odin.cgd.ucar.edu



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]