A recent talk with a friend made me realize that the following declspec is not very well known. It’s used to avoid inlining a function (the opposite of what we’re usually looking for, which probably explains why it might have remained obscure for a lot of us).
With VC++:
__declspec(noinline)
With gcc:
__attribute__ ((noinline))
It’s very useful for example with templated arrays, to make sure things like the resize functions are never inlined.
July 14th, 2010 at 8:41 am
This is of course assuming you know better than the compiler…
July 14th, 2010 at 9:07 am
Well on some platforms that’s really not difficult…. as you know. Interested readers can check this recent post by Charles Bloom: http://cbloomrants.blogspot.com/2010/07/07-10-10-powerpc-suxors.html
August 14th, 2010 at 5:29 pm
yop Zappy!
Pris en flag d’update de ton profil stniccc! Il rest 5 ans!!!