This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Re: Floats in std_cmath.h


> #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


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