http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59813

--- Comment #4 from Nikolay Orliuk <virkony at gmail dot com> ---
Andrew Pinski, as long as address of variable isn't taken out of scope of
function that is being tail-call optimized there is no need to worry about it
and it is safe to optimize. Am I wrong?

If stdc++ lib contains code like:

ostream &operator<<(ostream &os, char x)
{ os.__escape = &x; }

That's probably wrong and should be fixed.

Tried to override with:

ostream &operator<<(ostream &os, char x)
{ cout.put(x); return os; } // works on all 4.5.4, 4.7.3 and 4.8.2

ostream &operator<<(ostream &os, char x)
{ cout.write(&x, 1); return os; } // fails even without "bar" for 4.7.3 and
4.8.2

Note that strange behaviour of 4.7.3. Is that means that adding "bar" fires
inlining?..

Reply via email to