https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87950
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #14 from Jason Merrill <jason at gcc dot gnu.org> --- It would certainly be possible to recognize this situation (all enumerators handled) and suppress the -Wreturn-type warning even though we can't in general assume that we can't get other values of the enumeration. With the ability to explicitly request warnings in this situation with another flag. I don't know how much work that would be.