{"action":"created","issue":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1619","repository_url":"https://api.github.com/repos/official-stockfish/Stockfish","labels_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1619/labels{/name}","comments_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1619/comments","events_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1619/events","html_url":"https://github.com/official-stockfish/Stockfish/issues/1619","id":327704183,"node_id":"MDU6SXNzdWUzMjc3MDQxODM=","number":1619,"title":"Compiler warning on MinGW gcc 8.1.0","user":{"login":"man4","id":9985319,"node_id":"MDQ6VXNlcjk5ODUzMTk=","avatar_url":"https://avatars1.githubusercontent.com/u/9985319?v=4","gravatar_id":"","url":"https://api.github.com/users/man4","html_url":"https://github.com/man4","followers_url":"https://api.github.com/users/man4/followers","following_url":"https://api.github.com/users/man4/following{/other_user}","gists_url":"https://api.github.com/users/man4/gists{/gist_id}","starred_url":"https://api.github.com/users/man4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/man4/subscriptions","organizations_url":"https://api.github.com/users/man4/orgs","repos_url":"https://api.github.com/users/man4/repos","events_url":"https://api.github.com/users/man4/events{/privacy}","received_events_url":"https://api.github.com/users/man4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-30T12:16:18Z","updated_at":"2018-06-12T23:10:37Z","closed_at":null,"author_association":"NONE","body":"I'm getting the following compiler warning on MinGW, gcc 8.1.0 (which didn't appear in gcc 7.3.0):\r\n```\r\nmisc.cpp: In function 'int WinProcGroup::get_group(size_t)':\r\nmisc.cpp:241:77: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'fun1_t' {aka 'bool (*)(_LOGICAL_PROCESSOR_RELATIONSHIP, _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX*, long unsigned int*)'} [-Wcast-function-type]\r\n   auto fun1 = (fun1_t)GetProcAddress(k32, \"GetLogicalProcessorInformationEx\");\r\n                                                                             ^\r\nmisc.cpp: In function 'void WinProcGroup::bindThisThread(size_t)':\r\nmisc.cpp:309:71: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'fun2_t' {aka 'bool (*)(short unsigned int, _GROUP_AFFINITY*)'} [-Wcast-function-type]\r\n   auto fun2 = (fun2_t)GetProcAddress(k32, \"GetNumaNodeProcessorMaskEx\");\r\n                                                                       ^\r\nmisc.cpp:310:67: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'fun3_t' {aka 'bool (*)(void*, const _GROUP_AFFINITY*, _GROUP_AFFINITY*)'} [-Wcast-function-type]\r\n   auto fun3 = (fun3_t)GetProcAddress(k32, \"SetThreadGroupAffinity\");\r\n```\r\nAccording to the [release notes](https://gcc.gnu.org/gcc-8/changes.html) for gcc 8, the option `-Wextra` is responsible for this warning."},"comment":{"url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/comments/396763000","html_url":"https://github.com/official-stockfish/Stockfish/issues/1619#issuecomment-396763000","issue_url":"https://api.github.com/repos/official-stockfish/Stockfish/issues/1619","id":396763000,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Njc2MzAwMA==","user":{"login":"snicolet","id":6761856,"node_id":"MDQ6VXNlcjY3NjE4NTY=","avatar_url":"https://avatars1.githubusercontent.com/u/6761856?v=4","gravatar_id":"","url":"https://api.github.com/users/snicolet","html_url":"https://github.com/snicolet","followers_url":"https://api.github.com/users/snicolet/followers","following_url":"https://api.github.com/users/snicolet/following{/other_user}","gists_url":"https://api.github.com/users/snicolet/gists{/gist_id}","starred_url":"https://api.github.com/users/snicolet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicolet/subscriptions","organizations_url":"https://api.github.com/users/snicolet/orgs","repos_url":"https://api.github.com/users/snicolet/repos","events_url":"https://api.github.com/users/snicolet/events{/privacy}","received_events_url":"https://api.github.com/users/snicolet/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T23:10:37Z","updated_at":"2018-06-12T23:10:37Z","author_association":"NONE","body":"The gcc 8 release notes ( https://gcc.gnu.org/gcc-8/changes.html ) indicate that there is a new flag `-Wold-style-cast` to get help for how to deal with casting problems: \"_The -Wold-style-cast diagnostic can now emit fix-it hints telling you when you can use a static_cast, const_cast, or reinterpret_cast._\"\r\n\r\n==> @man4 , @mstembera If you have access to gcc 8, could you try to edit the makefile and compile the current master with `-Wold-style-cast` to see the diagnostic the compiler emits? Thanks in advance."}}
{"actor":{"display_login":"snicolet"}}