From bf9f50942d41c3d60eed5a253fff40f5e3b26d95 Mon Sep 17 00:00:00 2001 From: Wander Nauta Date: Tue, 21 Jul 2015 22:08:04 +0200 Subject: [PATCH] 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 --- src/nvim/eval.c | 11 +++++++++-- 1 file 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;