Subject: Re: bug#11935: XINT etc. should be functions

From: Eli Zaretskii <[email-masked]>
Date: Tue, 17 Jul 2012 06:04:14 +0300

> Date: Mon, 16 Jul 2012 15:46:31 -0700
> From: Paul Eggert <[email-masked]>
> Cc: [email-masked]
> 
> +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
> +# define ALWAYS_INLINE __attribute__ ((__always_inline__))
> +#else
> +# define ALWAYS_INLINE
> +#endif
> +
> +/* When compiling via GCC without optimization, and without -DINLINING=0,
> +   always inline functions marked 'inline'.  This typically improves CPU
> +   performance when debugging.  With optimization, trust the compiler
> +   to inline as appropriate.  */
> +#ifndef INLINING
> +# define INLINING 1
> +#endif
> +#if (defined __NO_INLINE__ \
> +     && ! defined __OPTIMIZE__ && ! defined __OPTIMIZE_SIZE__ \
> +     && INLINING && !defined inline)
> +# define inline ALWAYS_INLINE
> +#endif
> +

Wouldn't this inline all the functions declared 'inline'?  If so,
that's going too far, IMO.  I think we need a facility for doing this
only with a few functions that affect performance.