Messages in this thread | | | Date | Sun, 17 Sep 2000 16:10:46 -0700 | From | Richard Henderson <> | Subject | Re: Linux-2.4.0-test9-pre2 |
| |
On Mon, Sep 18, 2000 at 07:07:18AM +1200, Chris Wedgwood wrote: > - "extern inline" -> "static inline". It doesn't matter right now, > but it's proactive for future gcc versions. > > can someone please explain the difference?
info gcc 'c ext' inline
"extern inline" implies that an external definition exists, and that if the compiler chooses not to inline the function, that it needn't provide a out of line definition.
"static inline" implies that the function needn't be visible outside the unit of translation, and so if an out of line version isn't needed, it needn't be emitted.
"inline" currently implies that the function does need to be visible outside the unit of translation, and that an out of line version must always be provided. This may change in the future, since ISO C99 added the inline keyword and made it work like C++, i.e. static inline. The old behaviour would still be available from --std=gnu89.
r~ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |