This is the mail archive of the gcc-bugs@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]

[Bug c++/29378] The copy constructor is not being called upon return from function calls.



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-10-07 16:55 -------
(In reply to comment #2)
> 2) The second reason is that if GCC ignores the programmer written copy
> constructors, then the program will be misbehaved, and the results
> unpredictable, with even the possibility of a crash. Optimizations are
> understandable only if they don't leave objects in unknown states.

Only one object is ever created and will ever be destoried here.  So this is
not leaving the object in an unknown state because the state is well defined.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29378


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