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++/15793] Copy constructor doesn't work


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-03 17:24 -------
Nope this is one of the cases where the C++ standard allows the compiler to an optimization of not 
calling the copy construtor.

        A b = a.makeA();

Basically what the compiling is doing (but note b is not initalized when the call to makeA is done):
A b;
a.makeA(&b);

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


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


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