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