This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64870] value not set via reference
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Jan 2015 07:14:02 +0000
- Subject: [Bug c++/64870] value not set via reference
- Auto-submitted: auto-generated
- References: <bug-64870-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64870
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
(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 reading words and sentences.
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?
> clang produces the least surprising result. With gcc we end up with "wtf?"
C/C++ programmers learn about that soon enough.
> What is the benefit in changing the expected order of evaluation?
Performance.