https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78929
Bug ID: 78929 Summary: Incorrect implementation of Refining Expression Evaluation Order for Idiomatic C++ Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: boostcpp at gmail dot com Target Milestone: --- GCC 7 claims to support Refining Expression Evaluation Order for Idiomatic C++, proposed by P0145R3. https://gcc.gnu.org/projects/cxx-status.html#cxx1z Current GCC 7 head does incorrect evaluation on this code. #include <iostream> int main() { int i = 0 ; std::cout << ++i + ++i ; } The output should be 3 but current GCC 7 head output 4.