Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Andres_M_Intel4
Employee
63 Views

How to disable in-lining?

I would like to completely disable inlining to understand how optimizations are done,
and I couldn't get from documentation if -O0 disables inlining as doing -fno-inline.

Is -O0implying -fno-inline?
0 Kudos
3 Replies
Feilong_H_Intel
Employee
63 Views

-inline-level=0 (Linuxand Mac) or /Ob0 (Windows)
TimP
Black Belt
63 Views

Yes, -O0 should disable in-lining optimization. For linux, to disable in-lining at higher levels of optimization, -fno-inline-functions (a gcc option) is recommended.
jimdempseyatthecove
Black Belt
63 Views

__declspec( noinline )
void foo()
{
...
}

Jim Dempsey
Reply