[tree-ssa] Simplifying TARGET_EXPR
Gabriel Dos Reis
gdr@codesourcery.com
Sun Jul 21 20:39:00 GMT 2002
Mark Mitchell <mark@codesourcery.com> writes:
| > Do you think we should always elide copy-constructors by default,
| > unless explicitly told the contrary?
|
| Yes.
OK, I got it -- I think we're on the same page.
[...]
| On the other, copy constructor elision is observable
| behavior in the program, and it's going to make it hard to do
| debug, profile, and otherwise analyze your program if the number
| of copy constructor calls changes when you optimize.
Since the standard explicitly allows a compiler to elide
copy-constructors even though they have side-effects, C++ proggrammers
have come up (at least there are guidelines to that effect) not to
write programs whose semantics criticall depends on the number of
times copy-constructor/destructor are called.
I'm sympathetic to your take that we should try hard to preserve the
number of copy-constructor calls.
-- Gaby
More information about the Gcc
mailing list