Patch for missing sinf, cosf, ...

Steven King sxking@uswest.net
Wed Jun 7 13:44:00 GMT 2000


On Wed, 07 Jun 2000, Branko Èibej wrote:

> But this would also preclude using any of the builtins if the
> library function isn't present. The out-of-line call isn't always
> generated. Here's the relevant snippet from gcc/builtins.c:

  Hmmm. Good point. 

> And here's a snippet from my bootstrap log:
> 
> /home/brane/eval/gcc/build/OBJ/gcc/xgcc -B/home/brane/eval/gcc/build/OBJ/gcc/ -B/home/brane/eval/gcc/inst/sparc-sun-solaris2.6/bin/ -DHAVE_CONFIG_H -I. -I../../../../../gcc/libstdc++-v3/math -I.. -I.. -I/home/brane/eval/gcc/inst/include -g -O2 -c  -fPIC -DPIC ../../../../../gcc/libstdc++-v3/math/ccoshf.c -o .libs/ccoshf.lo
> ../../../../../gcc/libstdc++-v3/math/ccoshf.c: In function `ccoshf':
> .../../../../../gcc/libstdc++-v3/math/ccoshf.c:47: warning: type mismatch iin implicit declaration for built-in function `sinf'
> ../../../../../gcc/libstdc++-v3/math/ccoshf.c:48: warning: type mismatch iin implicit declaration for built-in function `cosf'
> 
> 
> Hmmm... there are 18 such warnings. Now I wonder what would happen if
> we managed to get rid of them? Perhaps math/mathconf.h should be fixed,
> not {shadow/}bits/std_cmath.h?

  Ah, I see, the problem is in C code, so indeed, changing std_cmath.h wont do
much good here anyway.  What happens if you change the checks in
math/mathconf.h to use || instead of &&?

-- 
Steven King
sxking@uswest.net


More information about the Libstdc++ mailing list