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

2006-10-07 Thread pinskia at gcc dot gnu dot org
--- 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

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

2006-10-07 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-10-07 16:36 --- (In reply to comment #2) > Ok, I see that GCC has a work-around for this issue, but I must insist that > the > GCC compiler is incorrect in its interpretation of the C++ standard for two > reasons. The C++ standard

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

2006-10-07 Thread SSacek at appsecinc dot com
--- Comment #2 from SSacek at appsecinc dot com 2006-10-07 09:19 --- Ok, I see that GCC has a work-around for this issue, but I must insist that the GCC compiler is incorrect in its interpretation of the C++ standard for two reasons. 1) Optimizations should be allowed for temporary obje

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

2006-10-07 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-10-07 08:17 --- You want to use -fno-elide-constructors. See http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/C_002b_002b-Dialect-Options.html This is not a bug as this is an allowed optimization by the C++ standard. -- pinskia at g

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

2006-10-07 Thread SSacek at appsecinc dot com
ndif -- Summary: The copy constructor is not being called upon return from function calls. Product: gcc Version: 3.4.6 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo:

Sorry - The copy constructor is not being called

2006-10-06 Thread ssacek
The program below works for the Solaris and Microsoft compilers, but not for the GCC compiler. Can anybody else verify this, and or if it's already been fixed? I'm using: -bash-3.00$ gcc -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr

Copy constructor is not being called

2006-10-06 Thread ssacek