https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870
--- Comment #7 from Andrew Pinski ---
(In reply to Conrad from comment #6)
> (In reply to Andrew Pinski from comment #5)
> > No, that is not how C++ defines it. As mentioned before C++ does not define
> > the order of the execution of the operan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870
--- Comment #6 from Conrad ---
(In reply to Andrew Pinski from comment #5)
> No, that is not how C++ defines it. As mentioned before C++ does not define
> the order of the execution of the operands.
I agree this is not how C++ defines it. At th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870
--- Comment #4 from Conrad ---
(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 << ope
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870
--- Comment #3 from Marc Glisse ---
(In reply to Conrad from comment #2)
> Notwithstanding loopholes in C++ legalese,
No loopholes, this was a deliberate choice in C.
> the expected result is to
> evaluate things left to right, just like readin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870
--- Comment #2 from Conrad ---
Notwithstanding loopholes in C++ legalese, the expected result is to evaluate
things left to right, just like reading words and sentences.
clang produces the least surprising result. With gcc we end up with "wtf?"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870
Marc Glisse changed:
What|Removed |Added
Severity|major |normal
--- Comment #1 from Marc Glisse --