This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: New C++ Attribute: final (sorry, wrong subject)


Cheng, Cheuk wrote:
When I compile the same source code without any optimizations (-O1, -O2,
etc.) , then I can see a call to A::~A instead of ___builtin_delete().

GCC is an optimizing compiler. When you compile without optimization, we call A::~A which calls delete. When you compile with optimization, then we do function inlining, and we call delete directly, which is faster. The function inlining will only occur if it is safe.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]