[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`extern inline' vs `static inline'
From: |
Igor Khavkine |
Subject: |
`extern inline' vs `static inline' |
Date: |
Mon, 25 Jun 2001 02:07:06 -0400 |
User-agent: |
Mutt/1.3.18i |
I've noticed that lots of headers in glibc use `extern inline'
to declare macro-like inline functions. However this paragraph
from the gcc documentation bothers me (C Extensions/Inline):
For future compatibility with when GCC implements ISO C99 semantics
for inline functions, it is best to use `static inline' only.
(The
existing semantics will remain available when `-std=gnu89' is
specified, but eventually the default will be `-std=gnu99' and
that
will implement the C99 semantics, though it does not do so
yet.)
Is there any advantage to using `extern inline' as opposed to
`static inline' with the current implementations of gcc? The only
difference that I've noticed is that `static inline' produces
a linkable version of a function if it cannot be inlined while
`extern inline' does not. But aren't most of these `extern inline'
functions already redefined elsewhere without `extern inline' to
provide linkable versions?
Thanks.
Igor
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- `extern inline' vs `static inline',
Igor Khavkine <=