mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
43f7eec0cd
commit
bf9f50942d
@ -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.
|
// 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;
|
float_T f;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user