I stumbled across the INLINE pragma and managed to get it working, but I 'm still wondering why a simple:
inline void myfunc( void );
wouldn't work?
Solved! Go to Solution.
Hello
Compiler delivered on CW 5.9.0 implements the ISO/IEC 9899:1990 (also known as c90 ANSI C standard.
In this standard inline is not a valid keyword for ANSI C language. It is only recognized when you are programming in C++.
CrasyCat
Hello,
What you have is not correct usage for a pragma. The correct usage -
#pragma INLINE
void myfunc( void)
{
...
}
.
Regards,
Mac
Well, yes, that's what was working for me.
But I was asking why just using the inline declarator wouldn't work? I keep getting "missing decl" errors.
Hello,
AirDragon wrote:But I was asking why just using the inline declarator wouldn't work? I keep getting "missing decl" errors.
Perhaps this is because "inline" is not a valid keyword or typedef.
Regards,
Mac
Hello
Compiler delivered on CW 5.9.0 implements the ISO/IEC 9899:1990 (also known as c90 ANSI C standard.
In this standard inline is not a valid keyword for ANSI C language. It is only recognized when you are programming in C++.
CrasyCat
Huh, ok. That's wierd because I thought I saw the "inline" definition in ISO/IEC 9899... I'll have to look at it again to see whats going on.
Many thanks, bigmac and CrasyCat.
Hello
Keyword inline has been added to the ISO/IEC 9899:1999 (also named c99) standard.
But compiler on CW 5.9 does not implement that version of the standard.
CrasyCat
Well that explains things rather nicely, Lol.
Thanks again.