https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54278
danikiw542 at bcpfm dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |danikiw542 at bcpfm dot com --- Comment #8 from danikiw542 at bcpfm dot com --- This warning is as the admonition portrayed In kind with no value. If control arrives at the end of a function and no return is encountered, GCC accepts an arrival with no arrival value. However, for this, the capacity requires an arrival value. Toward the finish of the function, return suitable value, regardless of whether control never comes there. Also you can solve that by doing follows: The problem is that other compilers have a warning about "unreachable code". If every switch case is handled, the compiler detects that the return statement cannot be reached. I have to suppress this warning or use the preprocessor to only have that return statement on certain compilers. Something like this piece of code. Link to the code. https://kodlogs.com/blog/852/warning-control-reaches-end-non-void-function-wreturn-type