Declaration of never defined member function changes generated code
Gabriel Dos Reis
gdr@integrable-solutions.net
Sat Dec 14 02:32:00 GMT 2002
Martin Buchholz <martin@xemacs.org> writes:
| This is related to my message "Failure to apply trivial peephole optimizations".
|
| Declaring (not defining) a member function should not cause generated
| code to be different.
Wrong. That depends on the kind of member function. If it is a copy
constructor (like in your case), then the compiler ought to use it
*whenever it copies* an object. That is just C++.
-- Gaby
More information about the Gcc
mailing list