Re: _GL_INLINE issue

2018-04-13 Thread Bruno Haible
Paul Eggert wrote: > > what was the motivation of changing > > 'static inline' to 'static' - other than "it's not needed" > > Partly so that the relevant modules wouldn't require AC_C_INLINE. This is a bit backwards: In gnulib, we usually write the C code first, and then put together the .m4 file

Re: _GL_INLINE issue

2018-04-13 Thread Paul Eggert
On 04/13/2018 07:03 AM, Bruno Haible wrote: what was the motivation of changing 'static inline' to 'static' - other than "it's not needed" Partly so that the relevant modules wouldn't require AC_C_INLINE. As I vaguely recall, I wanted to work around issues when gcc -fno-inline was used. This

Re: _GL_INLINE issue

2018-04-13 Thread Ben Pfaff
On Fri, Apr 13, 2018 at 04:03:45PM +0200, Bruno Haible wrote: > By the way, Paul, what is the problem with telling the compiler what to > 'static inline'? In other words, what was the motivation of changing > 'static inline' to 'static' - other than "it's not needed" - in the > 13 patches presented

Re: _GL_INLINE issue

2018-04-13 Thread Tim Rühsen
Hi Bruno, On 04/13/2018 04:03 PM, Bruno Haible wrote: > Hi Tim, > >> We use 'static _GL_INLINE' for some static functions we want to get >> inlined. > > This is a wrong use of '_GL_INLINE'. > > There are 3 uses of the keyword 'inline' in C: > 1) 'static inline'. > 2) 'inline' and 'extern inline

Re: _GL_INLINE issue

2018-04-13 Thread Bruno Haible
Hi Tim, > We use 'static _GL_INLINE' for some static functions we want to get > inlined. This is a wrong use of '_GL_INLINE'. There are 3 uses of the keyword 'inline' in C: 1) 'static inline'. 2) 'inline' and 'extern inline'. Portable use of 1) is simple: - use AC_REQUIRE([AC_C_INLINE]) - u