This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Floats in std_cmath.h
- To: jihem@ucdavis.edu
- Subject: Re: Floats in std_cmath.h
- From: Benjamin Kosnik <bkoz@cygnus.com>
- Date: Thu, 26 Aug 1999 02:06:36 -0700 (PDT)
- cc: libstdc++ <libstdc++@sourceware.cygnus.com>
> #include <bits/std_cmath.h>
>
> int main() {
>
> sin(static_cast<float>(0));
>
> return 0;
>
> }
yup. I filed a bug for you.
> compiles but the executable generates a Segmentation Fault. This happens
> with any math function in place of the sin. With double instead of float
> it runs fine. What's going on there ?
Well. We'd been debating adding the checks for the builtins and float
versions of these functions, so I just went ahead and did it, pending
approval by Gaby when he gets back in a week or two. There's got to be a
better way to do it than what I did, but my lobbying for a configure-time
macro in autoconf fell by the wayside. In anycase, the fix is in CVS, so
this should be usable again.
-benjamin