On Wed, 2005-05-25 at 13:19 +1000, James Gregory wrote: > > Hmm. Which I've just realised means that I was operating on the > assumption that gcc would generate multiple copies of the code if there > were places it could be inlined and other places where it couldn't. I > don't actually know if that's true. > > Interesting discussion.
Its all in the info pages (with presumably some delta in accuracy from reading the code) :). But - extern inline <blah> : always create a function, inline it wherever possible. static inline <blah> : never create an external symbol, inline it wherever possible, generates a private symbol in a translation unit if it has too - i.e. the inliner fails, or you take the address of the function. inline <blah> : same as extern inline <blah> IIRC. without the inline keyword , and with -finline & -O1, (or without -finline and -O2 or higher), inlining occurs where gcc thinks it should. Rob -- GPG key available at: <http://www.robertcollins.net/keys.txt>.
signature.asc
Description: This is a digitally signed message part
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
