This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/87951] GCC warns about reaching end of non-void function when all switch is completely handled
- From: "safinaskar at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 08 Dec 2018 23:27:30 +0000
- Subject: [Bug c++/87951] GCC warns about reaching end of non-void function when all switch is completely handled
- Auto-submitted: auto-generated
- References: <bug-87951-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87951
--- Comment #9 from Askar Safin <safinaskar at mail dot ru> ---
(In reply to Andrew Pinski from comment #8)
> Yes because they have different semantics ...
So, you mean that "enum class" is less strict than normal enums? This is very
strange.
Today I normally use "enum class", because they are advertised as "better". And
now I see that, well, they are *less* strict, than normal enums, and thus (to
get better compiler warnings) I need to switch to "old bad" enums, right?! This
is very-very strange. So if I want good compiler messages I need to convert my
code from "good modern" enum class to "bad old" enums, right?! Is there some
hack to get better compiler warnings for "enum class"? Something like
-fstrict-enums, but for "enum class"?