
18 Nov
2004
18 Nov
'04
3:17 a.m.
David Abrahams wrote:
"Thorsten Ottosen" <nesotto@cs.auc.dk> writes:
Here's my take on it: a compiler is allowed to a remove any copy operations as long as the programs observed behavior is the same. AFAICT, copying (or assigning) a vector<int> (compared to not doing it) will never change the observed behavior.
You're kidding, right? I doubt very much that the compiler can legitimately decide that side effects on the memory subsystem due to allocation are not observable.
This came up on the GCC lists a while back <http://gcc.gnu.org/ml/gcc/2004-10/msg00424.html>. Aaron W. LaFramboise