https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70412
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |manu at gcc dot gnu.org Resolution|--- |INVALID --- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Isabella from comment #0) > This is more of a question than a bug report: does that code need a default > case? I think it shouldn't, it handles all the possible return values... But the warning does not know this because it doesn't look into func() and analysing what func() returns may become very complex. It would be nice if it would at least try, but that is way beyond of current GCC capabilities. > Is that warning useful? Imagine somebody changes func() to return c.