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: Declaration of never defined member function changes generated code


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


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