[Bug c++/121434] spurious -Wsequence-point warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121434 --- Comment #7 from Jonathan Wakely --- (In reply to Jean-Yves Lefort from comment #5) > Clang surely isn't a panacea, at all, but you guys do whatever you do with > the standard or whatever your interpretation of it is. We're done with gcc, > we drop support. What a silly reaction. This has nothing to do with GCC interpreting the standard differently from Clang. GCC correctly evaluates the arguments left-to-right in this case, there's just a false positive warning. I agree with comment 6 that the warning is incorrect and unhelpful, harmful even.
[Bug c++/121434] spurious -Wsequence-point warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121434 Matthijs van Duin changed: What|Removed |Added CC||matthijsvanduin at gmail dot com --- Comment #6 from Matthijs van Duin --- (In reply to Andrew Pinski from comment #1) > Note IIRC Wsequence-point is designed for the C++98 rules rather than more > recent rules and this is on purpose. If this is true then that's a bad decision imho. Warning about "undefined behaviour" when the behaviour is in fact well-defined is a bug, plain and simple. When I specify -std=c++17 or later it means I no longer care about the limitations of older versions of the standard, and in fact almost certainly the code won't even compile using those older versions, hence whether or not it would have undefined behaviour under older rules is completely irrelevant.
[Bug c++/121434] spurious -Wsequence-point warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121434 --- Comment #5 from Jean-Yves Lefort --- I see. Well, it's not very important. On this 80k+ lines codebase gcc is literally twice as slow as clang to build the entire thing (if only that). I just have a CI with a gcc build just, for, I don't know which reason exactly. Clang surely isn't a panacea, at all, but you guys do whatever you do with the standard or whatever your interpretation of it is. We're done with gcc, we drop support. Have a nice day.
[Bug c++/121434] spurious -Wsequence-point warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121434 --- Comment #4 from Andrew Pinski --- (In reply to Jean-Yves Lefort from comment #3) > You mean that gcc completely ignores -std=c++23? No, just the warning ignores -std=c++23. there is a difference.
[Bug c++/121434] spurious -Wsequence-point warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121434 --- Comment #3 from Jean-Yves Lefort --- You mean that gcc completely ignores -std=c++23?
[Bug c++/121434] spurious -Wsequence-point warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121434 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=65866 --- Comment #2 from Andrew Pinski --- Actually this might be just a dup of bug 65866.
[Bug c++/121434] spurious -Wsequence-point warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121434 --- Comment #1 from Andrew Pinski --- Note IIRC Wsequence-point is designed for the C++98 rules rather than more recent rules and this is on purpose.
