This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Declaration of never defined member function changes generated code
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: martin at xemacs dot org
- Cc: gcc at gcc dot gnu dot org
- Date: 14 Dec 2002 10:51:38 +0100
- Subject: Re: Declaration of never defined member function changes generated code
- Organization: Integrable Solutions
- References: <15866.64727.9910.401827@wobble.local>
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