diff options
author | Wander Nauta <info@wandernauta.nl> | 2015-07-21 22:08:04 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-07-21 18:49:16 -0400 |
commit | bf9f50942d41c3d60eed5a253fff40f5e3b26d95 (patch) | |
tree | d2dd993beca3dfa00bccd3babd1b26ccfe0515f5 /src/nvim/eval.c | |
parent | 43f7eec0cd9dcba288a30c04e2577fe7c7fd3700 (diff) | |
download | rneovim-bf9f50942d41c3d60eed5a253fff40f5e3b26d95.tar.gz rneovim-bf9f50942d41c3d60eed5a253fff40f5e3b26d95.tar.bz2 rneovim-bf9f50942d41c3d60eed5a253fff40f5e3b26d95.zip |
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
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index b45428e7e7..0e0ccc67de 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -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; |