Does not expand C++ inline functions.
Under the C++ language rules, a C++ inline function is a function for which one of the following statements is true.
The function is defined using the inline keyword,
The function is defined (not just declared) inside a class definition
The function is a compiler-generated class member function
Under the C++ language rules, the compiler can choose whether actually to inline a call to an inline function. The C++ compiler inlines calls to an inline function unless:
The function is too complex,
The +d option is selected, or
The -g option is selected
By default, the compiler may inline the functions f() and memf2() in the following code example. In addition, the class has a default compiler-generated constructor and destructor that the compiler may inline. When you use +d, the compiler will not inline f()and C::mf2(), the constructor, and the destructor.
inline int f() {return 0;} // may be inlined class C { int mf1(); // not inlined unless inline definition comes later int mf2() {return 0;} // may be inlined }; |
This option is automatically turned on when you specify –g, the debugging option.
The –g0 debugging option does not turn on +d.
The +d option has no effect on the automatic inlining that is performed when you use -xO4 or -xO5.
–g0, –g