You neglected to mention that the body of the function is also present
with the declaration. In which case they are not the same.
Without the extern the function is actually a part of the local source file.
With the extern the function only gets inserted inline in the local file
but does not get compiled in as a separate function. Now the tricky bit,
gcc only does inlining when you turn on optimization. If you compile
the above without optimization but with "extern __inline__" then the
code never appears anywhere (gcc things the code will be linked in
from another file), so you loose.
The "extern __inline__" form gets used when you want to have a bit of
inlined code that never appears as a callable routing itself. You just
need to make sure you have optimization turned on or it won't work.
-- Eric Schenk www: http://www.dna.lth.se/~erics Dept. of Comp. Sci., Lund University email: Eric.Schenk@dna.lth.se Box 118, S-221 00 LUND, Sweden fax: +46-46 13 10 21 ph: +46-46 222 96 38