[Bug c++/95103] Unexpected -Wclobbered in bits/vector.tcc with -O2

2020-05-14 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95103 --- Comment #5 from Alexander Monakov --- No, this analogy does not work. setjmp both sets up a buffer and receives control, so it corresponds to both try and catch together. A matching "C++" code would look like: > void f3() { > std::vector

[Bug c++/95103] Unexpected -Wclobbered in bits/vector.tcc with -O2

2020-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95103 --- Comment #4 from Jonathan Wakely --- The content of the warning isn't very helpful, but I think it's pointing out a real issue in the code, not a false positive. Any valid longjmp which followed that setjmp would have undefined behaviour if e

[Bug c++/95103] Unexpected -Wclobbered in bits/vector.tcc with -O2

2020-05-14 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95103 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org --- Comm

[Bug c++/95103] Unexpected -Wclobbered in bits/vector.tcc with -O2

2020-05-13 Thread sbergman at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95103 --- Comment #2 from Stephan Bergmann --- (In reply to Richard Biener from comment #1) > Does it work placing the initial part of the function in a separate { }? Yes, > @@ -14,11 +14,13 @@ > return true; > } > void f3() { > +{ >

[Bug c++/95103] Unexpected -Wclobbered in bits/vector.tcc with -O2

2020-05-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95103 Richard Biener changed: What|Removed |Added Version|unknown |10.1.0 Keywords|