[Bug c++/15793] Copy constructor doesn't work

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jun 3 17:24:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list