[Bug middle-end/88401] -Wshift-overflow only works for const variables

2018-12-07 Thread skvadrik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88401 --- Comment #5 from Ulya --- (In reply to Jakub Jelinek from comment #4) Right, I see. Bugzilla forced me to add the previous comment when I changed the status. ;)

[Bug middle-end/88401] -Wshift-overflow only works for const variables

2018-12-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88401 --- Comment #4 from Jakub Jelinek --- That is not that easy, because what is considered invalid heavily depends on the FE (and standard version), e.g. the above is completely valid in C++20. Furthermore, warning too late in the middle-end could

[Bug middle-end/88401] -Wshift-overflow only works for const variables

2018-12-07 Thread skvadrik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88401 Ulya changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug middle-end/88401] -Wshift-overflow only works for const variables

2018-12-07 Thread skvadrik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88401 --- Comment #2 from Ulya --- (In reply to Jakub Jelinek from comment #1) > It is a front-end warning, so there is no constant propagation possible. > You can use -fsanitize=shift to detect this stuff at runtime. Ok, understood. Maybe someday it

[Bug middle-end/88401] -Wshift-overflow only works for const variables

2018-12-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88401 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1