Discussion:
math functions errors on 32-bit MSVC
(too old to reply)
Bruno Haible
2016-12-17 22:15:53 UTC
Permalink
Raw Message
Compiling a gnulib testdir with 32-bit MSVC 14, I get these errors:

C:\cygwin64\home\bruno\testdir-posix\gllib\acosf.c(24): error C2084: function 'float acosf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\asinf.c(24): error C2084: function 'float asinf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\atan2f.c(24): error C2084: function 'float atan2f(float,float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\atanf.c(24): error C2084: function 'float atanf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\cosf.c(24): error C2084: function 'float cosf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\coshf.c(24): error C2084: function 'float coshf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\expf.c(24): error C2084: function 'float expf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\fmodf.c(24): error C2084: function 'float fmodf(float,float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\fmodl.c(26): error C2084: function 'long double fmodl(long double,long double)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\hypotf.c(24): error C2084: function 'float hypotf(float,float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\hypotl.c(28): error C2084: function 'long double hypotl(long double,long double)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\log10f.c(25): error C2084: function 'float log10f(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\log10l.c(26): error C2084: function 'long double log10l(long double)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\logf.c(25): error C2084: function 'float logf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\sinf.c(24): error C2084: function 'float sinf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\sinhf.c(24): error C2084: function 'float sinhf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\sqrtf.c(24): error C2084: function 'float sqrtf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\tanf.c(24): error C2084: function 'float tanf(float)' already has a body
C:\cygwin64\home\bruno\testdir-posix\gllib\tanhf.c(24): error C2084: function 'float tanhf(float)' already has a body

The reason is that these functions are defined as inline functions in <math.h>.

Fixed through the attached changes (one per module). Pretty repetitive: it's
always the same common idiom.

Bruno

Loading...