[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: _GL_INLINE issue
From: |
Tim Rühsen |
Subject: |
Re: _GL_INLINE issue |
Date: |
Fri, 13 Apr 2018 16:23:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
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'.
>
> Portable use of 1) is simple:
> - use AC_REQUIRE([AC_C_INLINE])
> - use 'static inline' in the code.
>
> Portable use of 2) is more involved: This is what
> https://www.gnu.org/software/gnulib/manual/html_node/extern-inline.html
> is about.
>
> When you write 'static _GL_INLINE', you are mixing up the cases 1) and 2).
Ah ! Thanks for the clarification :-)
We indeed only wanted to use 1)
With Best Regards, Tim
signature.asc
Description: OpenPGP digital signature