{"action":"created","issue":{"url":"https://api.github.com/repos/fmtlib/fmt/issues/945","repository_url":"https://api.github.com/repos/fmtlib/fmt","labels_url":"https://api.github.com/repos/fmtlib/fmt/issues/945/labels{/name}","comments_url":"https://api.github.com/repos/fmtlib/fmt/issues/945/comments","events_url":"https://api.github.com/repos/fmtlib/fmt/issues/945/events","html_url":"https://github.com/fmtlib/fmt/issues/945","id":384087546,"node_id":"MDU6SXNzdWUzODQwODc1NDY=","number":945,"title":"-Wconversion on clang","user":{"login":"0x8000-0000","id":3999798,"node_id":"MDQ6VXNlcjM5OTk3OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3999798?v=4","gravatar_id":"","url":"https://api.github.com/users/0x8000-0000","html_url":"https://github.com/0x8000-0000","followers_url":"https://api.github.com/users/0x8000-0000/followers","following_url":"https://api.github.com/users/0x8000-0000/following{/other_user}","gists_url":"https://api.github.com/users/0x8000-0000/gists{/gist_id}","starred_url":"https://api.github.com/users/0x8000-0000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0x8000-0000/subscriptions","organizations_url":"https://api.github.com/users/0x8000-0000/orgs","repos_url":"https://api.github.com/users/0x8000-0000/repos","events_url":"https://api.github.com/users/0x8000-0000/events{/privacy}","received_events_url":"https://api.github.com/users/0x8000-0000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-11-25T15:08:33Z","updated_at":"2018-11-28T02:15:07Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This code looks strange:\r\n\r\ninclude/fmt/core.h:1268\r\n\r\n`\r\n1267   basic_format_args(const format_arg *args, size_type count)\r\n\r\n1268   : types_(-static_cast<int64_t>(count)) {\r\n\r\n1269     set_data(args);\r\n\r\n1270   }\r\n`\r\n\r\nBecause size_type is defined to be 'unsigned' on line 1199.\r\nLine 1268 expands that to a int64_t, then we multiply by -1, then we store it in types_ which is 'unsigned long long'!"},"comment":{"url":"https://api.github.com/repos/fmtlib/fmt/issues/comments/442292677","html_url":"https://github.com/fmtlib/fmt/issues/945#issuecomment-442292677","issue_url":"https://api.github.com/repos/fmtlib/fmt/issues/945","id":442292677,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjI5MjY3Nw==","user":{"login":"0x8000-0000","id":3999798,"node_id":"MDQ6VXNlcjM5OTk3OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/3999798?v=4","gravatar_id":"","url":"https://api.github.com/users/0x8000-0000","html_url":"https://github.com/0x8000-0000","followers_url":"https://api.github.com/users/0x8000-0000/followers","following_url":"https://api.github.com/users/0x8000-0000/following{/other_user}","gists_url":"https://api.github.com/users/0x8000-0000/gists{/gist_id}","starred_url":"https://api.github.com/users/0x8000-0000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0x8000-0000/subscriptions","organizations_url":"https://api.github.com/users/0x8000-0000/orgs","repos_url":"https://api.github.com/users/0x8000-0000/repos","events_url":"https://api.github.com/users/0x8000-0000/events{/privacy}","received_events_url":"https://api.github.com/users/0x8000-0000/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T02:15:07Z","updated_at":"2018-11-28T02:15:07Z","author_association":"CONTRIBUTOR","body":"I think we should not silence the diagnostic, but heed the advice of the compiler and implement the code without the contortions of the static_casts. Looking at the standard library headers, there are very few static casts and I can only see three instances of -Wliteral-suffix being ignored.\r\n\r\nThere is no pragma diagnostic ignore \"-Wconversion\" or \"-Wshadow\" in the library. If this library aims to become part of the C++ Standard Library, or at least the standard C++ formatting library, I think we should aim to be able to build without warning suppression."}}
{"actor":{"display_login":"0x8000-0000"}}