tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: math.h, copysign, visibility defines



Am Thu, Feb 24, 2022 at 07:59:22AM -0500 schrieb Greg Troxel:
> 
> I'm trying to build wip/ocaml on NetBSD 9 amd64 and came across:
> 
>   gcc -c -O2 -fno-strict-aliasing -fwrapv  -pthread  -Wall -Wdeclaration-after-statement -Werror -fno-common -fexcess-precision=standard -fno-tree-vrp -fPIC -ffunction-sections -g -O2 -fPIC -D_FORTIFY_SOURCE=2 -I/usr/include -D_FILE_OFFSET_BITS=64 -DCAML_NAME_SPACE  -DCAMLDLLIMPORT= -I/usr/include -o floats.b.o floats.c
>   floats.c: In function 'caml_copysign':
>   floats.c:1074:10: error: implicit declaration of function 'copysign' [-Werror=implicit-function-declaration]
>      return copysign(x, y);
>             ^~~~~~~~
>   floats.c:1074:10: error: incompatible implicit declaration of built-in function 'copysign' [-Werror]
>   floats.c:1074:10: note: include '<math.h>' or provide a declaration of 'copysign'
>   cc1: all warnings being treated as errors
>   gmake[2]: *** [Makefile:366: floats.b.o] Error 1

This was fixed in current almost exactly two years ago.

Joerg


Home | Main Index | Thread Index | Old Index