https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60725
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Jens Auer from comment #2) > This warnings becomes annoying when you also compile with -Wswitch-enum > which forces you to cover all enum values. When they are all covered, I do > not need a default statement, but to prevent Wreturn-type, I have to add a > pseudo-default. Even if you do not explicitly write one, there is one for the case where the value is outside the enum values, which is valid in C (but not in C++, as far as I know, thus the warning would be questionable there). What is not valid is to reach the end of a non-void function.