https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Conrad from comment #4)
> (In reply to Marc Glisse from comment #3)
> > 
> > Except when there is an = sign, where you expect the right hand side to be
> > evaluated before the left? And maybe a few other cases?
> 
> For iostreams which use the << operator for printing, the expected order is
> to print things left-to-right, and hence evaluate left-to-right.

No, that is not how C++ defines it.  As mentioned before C++ does not define
the order of the execution of the operands.

> 
> > > What is the benefit in changing the expected order of evaluation?
> > 
> > Performance.
> 
> Is there a benchmark to support the re-ordering?  If we're talking 1%-2%
> here and there, is this really worth the "wtf" moments?

There is no wtf moments.  This is not Java which has well defined behavior :).

Reply via email to