{"action":"created","issue":{"url":"https://api.github.com/repos/fmtlib/fmt/issues/928","repository_url":"https://api.github.com/repos/fmtlib/fmt","labels_url":"https://api.github.com/repos/fmtlib/fmt/issues/928/labels{/name}","comments_url":"https://api.github.com/repos/fmtlib/fmt/issues/928/comments","events_url":"https://api.github.com/repos/fmtlib/fmt/issues/928/events","html_url":"https://github.com/fmtlib/fmt/issues/928","id":377376675,"node_id":"MDU6SXNzdWUzNzczNzY2NzU=","number":928,"title":"Inconsistent warning flags specified in CMakeLists.txt for different compilers (possibly by mistake)","user":{"login":"nyronium","id":31919558,"node_id":"MDQ6VXNlcjMxOTE5NTU4","avatar_url":"https://avatars3.githubusercontent.com/u/31919558?v=4","gravatar_id":"","url":"https://api.github.com/users/nyronium","html_url":"https://github.com/nyronium","followers_url":"https://api.github.com/users/nyronium/followers","following_url":"https://api.github.com/users/nyronium/following{/other_user}","gists_url":"https://api.github.com/users/nyronium/gists{/gist_id}","starred_url":"https://api.github.com/users/nyronium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyronium/subscriptions","organizations_url":"https://api.github.com/users/nyronium/orgs","repos_url":"https://api.github.com/users/nyronium/repos","events_url":"https://api.github.com/users/nyronium/events{/privacy}","received_events_url":"https://api.github.com/users/nyronium/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-11-05T12:21:34Z","updated_at":"2018-11-07T01:44:06Z","closed_at":"2018-11-07T01:44:06Z","author_association":"NONE","body":"While skimming through the `CMakeLists.txt`, I found that several warning flags have inconsistent (opposite) values for gcc and clang, which seems to be a mistake (please elaborate if I'm wrong).\r\n\r\n\r\n#### First inconsistency `-Wzero-as-null-pointer-constant`\r\n\r\nFor gcc, `-Wzero-as-null-pointer-constant` is explicitly enabled if the host uses gcc >= 5.0,\r\nwhile for clang `-Wno-zero-as-null-pointer-constant` (Note the **`-Wno-`**) is set and therefore the warning is disabled.\r\n\r\n#### Second inconsistency `-Wshadow`\r\n\r\nAlso in gcc's `PEDANTIC_COMPILE_FLAGS`, `-Wshadow` is followed by `-Wno-shadow`:\r\n\r\n```cmake\r\nset(PEDANTIC_COMPILE_FLAGS -pedantic-errors -Wall -Wextra -pedantic\r\n    -Wold-style-cast -Wundef\r\n    -Wredundant-decls -Wshadow [...] -Wno-shadow)\r\n```\r\n\r\n#### Other issues\r\n\r\nPossibly there are other inconsistencies or mistakes, but as the authors intent does not appear clearly to me, I am unable to further judge the other flags.\r\nI just wanted to point out, that almost every flag passed to clang is prefixed with `-Wno-`, and as `-Wno-zero-as-null-pointer-constant` appears to be a mistake, it might be worth having a look at the other flags, too."},"comment":{"url":"https://api.github.com/repos/fmtlib/fmt/issues/comments/436473483","html_url":"https://github.com/fmtlib/fmt/issues/928#issuecomment-436473483","issue_url":"https://api.github.com/repos/fmtlib/fmt/issues/928","id":436473483,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjQ3MzQ4Mw==","user":{"login":"vitaut","id":576385,"node_id":"MDQ6VXNlcjU3NjM4NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/576385?v=4","gravatar_id":"","url":"https://api.github.com/users/vitaut","html_url":"https://github.com/vitaut","followers_url":"https://api.github.com/users/vitaut/followers","following_url":"https://api.github.com/users/vitaut/following{/other_user}","gists_url":"https://api.github.com/users/vitaut/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaut/subscriptions","organizations_url":"https://api.github.com/users/vitaut/orgs","repos_url":"https://api.github.com/users/vitaut/repos","events_url":"https://api.github.com/users/vitaut/events{/privacy}","received_events_url":"https://api.github.com/users/vitaut/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T01:44:06Z","updated_at":"2018-11-07T01:44:06Z","author_association":"CONTRIBUTOR","body":"Looks like I accidentally messed up the warnings. Should be cleaned in https://github.com/fmtlib/fmt/commit/34030deca9e64ef0523eff48993fc028d01df1fe."}}
{"actor":{"display_login":"vitaut"}}