[Bug c++/87404] Implement -Wenum-compare and -Wenum-compare-switch

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 14 17:57:24 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87404

--- Comment #9 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Ævar Arnfjörð Bjarmason from comment #8)
> Eric: I filed bug 87983. I think it makes sense to mark it as a duplicate
> only if this one covers both C and C++, right now the "component" for this
> one is C++.
> 
> As bug 87983 notes in passing C does not have first-class enums, so
> implementing this will presumably be a bit harder than C++, and .

My understanding was that this bug would cover both C and C++, as I'm pretty
sure I've seen this clang warning in plain-C code before, too (and there's no
component for the code shared by the C family of languages, which is where I'd
assume this would be implemented)


More information about the Gcc-bugs mailing list