Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork219
Closed
Description
So that we can write
bool foo(int x) { switch (x) { case 1: return true; case 2: return false; default: stop("Don't know this x"); }}without issuing a warning.
There is a "noreturn" attribute forGCC andclang, but there might be other solutions.EDIT:http://stackoverflow.com/a/25408952/946850 is a nice SO answer that features__builtin_unreachable().
Metadata
Metadata
Assignees
Labels
No labels