https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91415
--- Comment #13 from Nicolai Josuttis <nico at josuttis dot de> --- Oh, sorry, your are right, the example indeed works. BUT: I used in fact a slightly different example (sorry, didn't expect that there is a difference): int main() { int i = 0; int j = i++ << i++; // OK, NO WARNING std::cout << i++ << i++; // still WARNING } see https://wandbox.org/permlink/ioZnOv3oAp5F0BsQ According to my understanding the warning should especially also not come when we pass i++ twice to std::cout (to sequence output was a key goal of this fix in C++17). But may be I am missing something.