What is the difference between "inline" and "inline"?
I have programs with both. "inline" works, "inline" has an error "Unable to resolve identifier inline"


Sorry, the first inline didn't let me post double underscores before and after as with the fourth and fifth inline.

It's really not all that difficult - the standard inline keyword is SUGGESTION to the compiler to duplicate the function contents each time it appears in the program -- the compiler can coose to ignore inline if it wants to. The gcc extension _always_inline causes thee gcc to duplicate the function all the time, whether optimizing the program or not.

Thank you. Now what's the difference between inline and __inline__?
inline works, __inline__ has an error. I don't really want to be removing the underscores without knowing what they're doing.

The way I understand it, __inline__is an older version of the inline keyword -- it was an extension to some compilers. It's pretty much obolete nowdays except for older c89 compilers (link).

Edited 2 Years Ago by Ancient Dragon

This question has already been answered. Start a new discussion instead.