Re: C99 inlines
- From: Stefan Farfeleder <stefan@xxxxxxxxxxxxx>
- Date: Mon, 9 Mar 2009 14:40:42 +0100
On Mon, Mar 09, 2009 at 09:55:41PM +1100, Andrew Reilly wrote:
On Sun, Mar 08, 2009 at 03:09:24AM -0400, David Schultz wrote:
My main motivation is that currently there's no easy way to use
non-static inline functions that works with both gcc and other
compilers.
Please pardon my ignorance: what *is* non-static inline
behaviour? I've only ever used static inlines myself: they're
the only sort that make sense (to me), in the world of standard
C static compilation and linkage. What happens elsewhen? Does
the compiler generate a "real" function with an exportable name
that can be linked-to? Why would you want to do that, when
that's what perfectly ordinary functions do? I can't imagine an
extern inline meaning anything useful unless one can do
LLVM-style link-time optimization. Is that on the cards?
With static inline functions you end up with a copy in each object file
where the compiler decided to not inline at least one call, with an
inline function with external linkage all these copies are coalesced to
a single one.
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- References:
- C99 inlines
- From: David Schultz
- Re: C99 inlines
- From: Sam Leffler
- Re: C99 inlines
- From: David Schultz
- Re: C99 inlines
- From: Andrew Reilly
- C99 inlines
- Prev by Date: Re: C99 inlines
- Next by Date: Current problem reports assigned to freebsd-arch@FreeBSD.org
- Previous by thread: Re: C99 inlines
- Next by thread: Re: C99 inlines
- Index(es):
Relevant Pages
|