undefined errors for inline function

Jonathan Wakely jwakely.gcc@gmail.com
Mon Jan 30 10:29:00 GMT 2017


On 30 January 2017 at 09:34, Xi Ruoyao wrote:
> The C99 Standard (ISO/IEC 9899:1999 6.7.4) says:
>
>     Function specifiers shall be used *only* in the declaration of
>     an identifier for a function.
>
> In linker.c, we use the function specifier ``inline" in a
> *definition*. It's illegal.

I'm pretty sure that's not true. See the example slightly later in
6.7.4 that uses inline on function definitions.

A function definition is also a declaration, so it's allowed to have
the inline specifier.

The text you quoted means you can't put inline on declarations of
variables or types, only functions.



More information about the Gcc-help mailing list