https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77392
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Try with -W -Wall . This will warn about missing return for one path. Also you are casting so gcc does not want about the mismatch of function types.