0

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

thanks

2
Contributors
9
Replies
31
Views
2 Years
Discussion Span
Last Post by kent.johnstone_1
Featured Replies
  • 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 … Read More

  • 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)](http://stackoverflow.com/questions/2082551/what-does-inline-mean). Read More

0

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

1

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.

0

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.

1

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 by Ancient Dragon

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.