Optimizing of explicit temporary storage
Mike Stump
mrs@apple.com
Tue Oct 12 19:36:00 GMT 2004
On Oct 11, 2004, at 11:44 PM, Kai Henningsen wrote:
> Instead, what you'd need is to use some sort of language guarantees
> about
> the behaviour of the allocation functions themselves (new, delete,
> malloc,
> free) so the decision becomes local.
Or a simple statement in the language definition that pairs can be
optimized away in the right situation, even if there are side
effects... For example, a user defined new/delete that does a printf
could be considered ok, and that the compiler can get rid of pairs
output lines.
Making this a local decision would be a good language direction for C++.
More information about the Gcc
mailing list