[Bug c++/100700] -Wreturn-type has many false positives

2021-05-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100700 --- Comment #7 from Jonathan Wakely --- Right, and of course there are many -Wreturn-type cases where no switches or enums are involved at all. The warning is about the missing return from the end of the function, not about the switch that happ

[Bug c++/100700] -Wreturn-type has many false positives

2021-05-21 Thread harald at gigawatt dot nl via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100700 Harald van Dijk changed: What|Removed |Added CC||harald at gigawatt dot nl --- Comment

[Bug c++/100700] -Wreturn-type has many false positives

2021-05-21 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100700 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Commen

[Bug c++/100700] -Wreturn-type has many false positives

2021-05-20 Thread gonzalo.gadeschi at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100700 gnzlbg changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/100700] -Wreturn-type has many false positives

2021-05-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100700 --- Comment #3 from Jonathan Wakely --- (In reply to gnzlbg from comment #2) > Until C++17, creating an enum value that's out-of-range of the enum was > unspecified behavior. In C++ standard >= 17 (e.g. -std=c++17), this became > undefined behav

[Bug c++/100700] -Wreturn-type has many false positives

2021-05-20 Thread gonzalo.gadeschi at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100700 --- Comment #2 from gnzlbg --- > in a call to f(-1) the function falls off the end, Indeed, thanks. Using <= in the condition removes the warning. > and ditto in a call to h ((enum E)2) Until C++17, creating an enum value that's out-of-range

[Bug c++/100700] -Wreturn-type has many false positives

2021-05-20 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100700 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org Seve