{"action":"created","issue":{"url":"https://api.github.com/repos/msteveb/autosetup/issues/40","repository_url":"https://api.github.com/repos/msteveb/autosetup","labels_url":"https://api.github.com/repos/msteveb/autosetup/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/msteveb/autosetup/issues/40/comments","events_url":"https://api.github.com/repos/msteveb/autosetup/issues/40/events","html_url":"https://github.com/msteveb/autosetup/issues/40","id":383304819,"node_id":"MDU6SXNzdWUzODMzMDQ4MTk=","number":40,"title":"cc-check-flag \"mismatch\": cc-check-flag says yes, but the compiler says no","user":{"login":"sgbeal","id":235303,"node_id":"MDQ6VXNlcjIzNTMwMw==","avatar_url":"https://avatars2.githubusercontent.com/u/235303?v=4","gravatar_id":"","url":"https://api.github.com/users/sgbeal","html_url":"https://github.com/sgbeal","followers_url":"https://api.github.com/users/sgbeal/followers","following_url":"https://api.github.com/users/sgbeal/following{/other_user}","gists_url":"https://api.github.com/users/sgbeal/gists{/gist_id}","starred_url":"https://api.github.com/users/sgbeal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgbeal/subscriptions","organizations_url":"https://api.github.com/users/sgbeal/orgs","repos_url":"https://api.github.com/users/sgbeal/repos","events_url":"https://api.github.com/users/sgbeal/events{/privacy}","received_events_url":"https://api.github.com/users/sgbeal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-21T21:52:22Z","updated_at":"2018-12-18T16:16:51Z","closed_at":null,"author_association":"NONE","body":"This isn't really a bug, per se, but is an unfortunate side-effect of how cc-check-xxx works:\r\n\r\n```\r\n$ CC_FOR_BUILD=clang CC=clang ./configure\r\n...\r\nChecking whether the C compiler accepts -Wimplicit-fallthrough=5...yes\r\n...\r\n\r\n$ make\r\n...\r\n+ clang ... test.c\r\nwarning: unknown warning option '-Wimplicit-fallthrough=5'; did you mean '-Wimplicit-fallthrough'? [-Wunknown-warning-option]\r\n```\r\n\r\nThat \"mismatch\" would seem to be a side-effect of cc-check-xxx necessarily compiling with no warning/error flags. \r\n\r\nThere is a workaround, and i'm posting this ticket primarily to document that workaround in case anyone else stumbles over this (not because i expect that this can be fixed in autosetup):\r\n\r\n```\r\ncc-with {-cflags {-Wall -Wextra -Werror}} {\r\n    cc-check-flags -Wimplicit-fallthrough=5\r\n}\r\n```\r\n\r\nThat (as hoped) will pass on gcc7+ but fail on clang.\r\n\r\n(And, for the public record, i _HATE_ the gcc devs for making implicit fall-through a warning offense. One does not simply take a perfectly valid, widely-used 40-year-old feature and suddenly start reporting it via the warning flags. Those of us who habitually compile with `-Werror` now all hate you guys. We all now get to go \"fix\" all of our well-behaved source trees to please that handful of people who can't handle switch fall-through properly. Grrrrr.)"},"comment":{"url":"https://api.github.com/repos/msteveb/autosetup/issues/comments/448277448","html_url":"https://github.com/msteveb/autosetup/issues/40#issuecomment-448277448","issue_url":"https://api.github.com/repos/msteveb/autosetup/issues/40","id":448277448,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODI3NzQ0OA==","user":{"login":"sgbeal","id":235303,"node_id":"MDQ6VXNlcjIzNTMwMw==","avatar_url":"https://avatars2.githubusercontent.com/u/235303?v=4","gravatar_id":"","url":"https://api.github.com/users/sgbeal","html_url":"https://github.com/sgbeal","followers_url":"https://api.github.com/users/sgbeal/followers","following_url":"https://api.github.com/users/sgbeal/following{/other_user}","gists_url":"https://api.github.com/users/sgbeal/gists{/gist_id}","starred_url":"https://api.github.com/users/sgbeal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgbeal/subscriptions","organizations_url":"https://api.github.com/users/sgbeal/orgs","repos_url":"https://api.github.com/users/sgbeal/repos","events_url":"https://api.github.com/users/sgbeal/events{/privacy}","received_events_url":"https://api.github.com/users/sgbeal/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T16:16:51Z","updated_at":"2018-12-18T16:16:51Z","author_association":"NONE","body":"Closing - this ticket was really just for documentation purposes. autosetup, IMO, does the most sensible thing here, it's just surprising/unexpected when first encountered."}}
{"actor":{"display_login":"sgbeal"}}