Archive for July 13th, 2010

noinline

Tuesday, July 13th, 2010

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.

shopfr.org cialis