{"action":"opened","issue":{"url":"https://api.github.com/repos/RcppCore/Rcpp/issues/486","repository_url":"https://api.github.com/repos/RcppCore/Rcpp","labels_url":"https://api.github.com/repos/RcppCore/Rcpp/issues/486/labels{/name}","comments_url":"https://api.github.com/repos/RcppCore/Rcpp/issues/486/comments","events_url":"https://api.github.com/repos/RcppCore/Rcpp/issues/486/events","html_url":"https://github.com/RcppCore/Rcpp/issues/486","id":158020849,"number":486,"title":"How to teach the compiler that stop() doesn't return?","user":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars.githubusercontent.com/u/1741643?v=3","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-01T22:25:47Z","updated_at":"2016-06-01T22:25:47Z","closed_at":null,"body":"So that we can write\r\n\r\n```\r\nbool foo(int x) {\r\n  switch (x) {\r\n    case 1: return true;\r\n    case 2: return false;\r\n    default: stop(\"Don't know this x\");\r\n  }\r\n}\r\n```\r\n\r\nwithout issuing a warning.\r\n\r\nThere is a \"noreturn\" attribute for [GCC](https://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Function-Attributes.html) and [clang](http://clang.llvm.org/docs/LanguageExtensions.html), but there might be other solutions.\r\n\r\nRe https://github.com/hadley/dplyr/pull/1878#issuecomment-223140346, CC @hadley."}}
{"actor":{"display_login":"krlmlr"}}