eval.c: Only inline float_op_wrapper on non-i386 #3072

glibc on i386 seems to have an optimization that makes it harder to call
some math functions indirectly from inside an inlined function, causing
compile-time errors with some versions of gcc.  This removes inlining on
that platform.

Closes #3071
This commit is contained in:
Wander Nauta 2015-07-21 22:08:04 +02:00 committed by Justin M. Keyes
parent 43f7eec0cd
commit bf9f50942d

View File

@ -7102,8 +7102,15 @@ static inline int get_float_arg(typval_T *argvars, float_T *f)
}
// Apply a floating point C function on a typval with one float_T.
static inline void float_op_wrapper(typval_T *argvars, typval_T *rettv,
float_T (*function)(float_T))
//
// Some versions of glibc on i386 have an optimization that makes it harder to
// call math functions indirectly from inside an inlined function, causing
// compile-time errors. Avoid `inline` in that case. #3072
#ifndef ARCH_32
inline
#endif
static void float_op_wrapper(typval_T *argvars, typval_T *rettv,
float_T (*function)(float_T))
{
float_T f;