https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53479
--- Comment #14 from Eric Gallager <egall at gwmail dot gwu.edu> --- (In reply to Manuel López-Ibáñez from comment #9) > In summary, neither adding 'default' or 'return' are recommended to silence > this warning if you think the warning is wrong. If you think the warning > will always be wrong, use __builtin_unreachable(). If you think it is wrong > now, but you would like to notice if it stops being wrong, then use > assert(false). This is probably an issue for a separate bug, but speaking of __builtin_unreachable(), now that GCC is going to start recognizing the lint-style comment of: /* FALLTHROUGH */ for the benefit of -Wimplicit-fallthrough, could it also start recognizing the lint-style comment of: /* NOTREACHED */ as a synonym for __builtin_unreachable()? I've seen comments like that in a lot of code, actually, and it'd be a more portable solution than __builtin_unreachable().