This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/87951] GCC warns about reaching end of non-void function when all switch is completely handled


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"?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]