Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

How to disable in-lining?

Andres_M_Intel4
Employee
137 Views
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
137 Views
-inline-level=0 (Linuxand Mac) or /Ob0 (Windows)
TimP
Black Belt
137 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
137 Views
__declspec( noinline )
void foo()
{
...
}

Jim Dempsey
Reply