[Bug c++/96227] Comma operation sequencing issue

2022-12-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96227

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |8.5
 Resolution|--- |FIXED
 Status|WAITING |RESOLVED

[Bug c++/96227] Comma operation sequencing issue

2021-07-17 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96227

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
I think so, the evaluation order when invoking operator, not through the x, y
syntax is like for any other function call, the arguments evaluation is
indeterminately sequenced.
See https://en.cppreference.com/w/cpp/language/eval_order

[Bug c++/96227] Comma operation sequencing issue

2021-07-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96227

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #2 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #1)
> Confirmed, Note this was partly fixed with the fix for PR 82959.
> That is not invoked as a function case has been fixed for GCC 8.5.
> 
> On the trunk we produce as of today:
> first
> second
> SECOND
> FIRST

I actually think this is still correct output as the function call version is
not mentioned in "If an operator function is invoked using operator notation"
here.

Am I reading this correctly?

[Bug c++/96227] Comma operation sequencing issue

2021-07-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96227

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-07-16
 Status|UNCONFIRMED |NEW

--- Comment #1 from Andrew Pinski  ---
Confirmed, Note this was partly fixed with the fix for PR 82959.
That is not invoked as a function case has been fixed for GCC 8.5.

On the trunk we produce as of today:
first
second
SECOND
FIRST