https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54278
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to danikiw542 from comment #8) > https://kodlogs.com/blog/852/warning-control-reaches-end-non-void-function- > wreturn-type values not defined in enum's are still valid and well defined, that is a different issue all together and unrelated to this bug. There are others which have been closed as invalid for the reason mentioned here.