{"action":"created","comment":{"url":"https://api.github.com/repos/Z3Prover/z3/pulls/comments/189441092","pull_request_review_id":121625786,"id":189441092,"diff_hunk":"@@ -39,7 +40,7 @@ class buffer {\n     void expand() {\n         unsigned new_capacity = m_capacity << 1;\n         T * new_buffer        = reinterpret_cast<T*>(memory::allocate(sizeof(T) * new_capacity));\n-        memcpy(new_buffer, m_buffer, m_pos * sizeof(T));\n+        std::uninitialized_copy(std::make_move_iterator(m_buffer), std::make_move_iterator(m_buffer + m_pos), new_buffer);","path":"src/util/buffer.h","position":15,"original_position":15,"commit_id":"5315a01b7a9e484f01e23c911869d4e1d94b196b","original_commit_id":"5315a01b7a9e484f01e23c911869d4e1d94b196b","user":{"login":"NikolajBjorner","id":3085284,"avatar_url":"https://avatars2.githubusercontent.com/u/3085284?v=4","gravatar_id":"","url":"https://api.github.com/users/NikolajBjorner","html_url":"https://github.com/NikolajBjorner","followers_url":"https://api.github.com/users/NikolajBjorner/followers","following_url":"https://api.github.com/users/NikolajBjorner/following{/other_user}","gists_url":"https://api.github.com/users/NikolajBjorner/gists{/gist_id}","starred_url":"https://api.github.com/users/NikolajBjorner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikolajBjorner/subscriptions","organizations_url":"https://api.github.com/users/NikolajBjorner/orgs","repos_url":"https://api.github.com/users/NikolajBjorner/repos","events_url":"https://api.github.com/users/NikolajBjorner/events{/privacy}","received_events_url":"https://api.github.com/users/NikolajBjorner/received_events","type":"User","site_admin":false},"body":"I have no doubts the fix is correct. Nuno changed this code last, so it is better to make sure he is aware.","created_at":"2018-05-19T18:10:46Z","updated_at":"2018-05-19T18:10:46Z","html_url":"https://github.com/Z3Prover/z3/pull/1630#discussion_r189441092","pull_request_url":"https://api.github.com/repos/Z3Prover/z3/pulls/1630","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Z3Prover/z3/pulls/comments/189441092"},"html":{"href":"https://github.com/Z3Prover/z3/pull/1630#discussion_r189441092"},"pull_request":{"href":"https://api.github.com/repos/Z3Prover/z3/pulls/1630"}},"in_reply_to_id":189440898},"pull_request":{"url":"https://api.github.com/repos/Z3Prover/z3/pulls/1630","id":189167124,"html_url":"https://github.com/Z3Prover/z3/pull/1630","diff_url":"https://github.com/Z3Prover/z3/pull/1630.diff","patch_url":"https://github.com/Z3Prover/z3/pull/1630.patch","issue_url":"https://api.github.com/repos/Z3Prover/z3/issues/1630","number":1630,"state":"open","locked":false,"title":"Fix GCC Warnings","user":{"login":"danielschemmel","id":2600215,"avatar_url":"https://avatars1.githubusercontent.com/u/2600215?v=4","gravatar_id":"","url":"https://api.github.com/users/danielschemmel","html_url":"https://github.com/danielschemmel","followers_url":"https://api.github.com/users/danielschemmel/followers","following_url":"https://api.github.com/users/danielschemmel/following{/other_user}","gists_url":"https://api.github.com/users/danielschemmel/gists{/gist_id}","starred_url":"https://api.github.com/users/danielschemmel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielschemmel/subscriptions","organizations_url":"https://api.github.com/users/danielschemmel/orgs","repos_url":"https://api.github.com/users/danielschemmel/repos","events_url":"https://api.github.com/users/danielschemmel/events{/privacy}","received_events_url":"https://api.github.com/users/danielschemmel/received_events","type":"User","site_admin":false},"body":"Having recently built Z3 with GCC 8.1, I spent some time hunting down all current warnings on master. While performance in release mode should theoretically not be significantly affected, this relies on the optimizer doing its job in practice.\r\n\r\nChanges are grouped into commits by the warning that they used to cause.\r\n\r\nAt this point, only a single warning remains:\r\n```\r\n../src/test/hwf.cpp: In function ‘void bug_is_int()’:\r\n../src/test/hwf.cpp:105:21: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]\r\n     double   val = *(double*)(raw_val);\r\n                     ^~~~~~~~~~~~~~~~~~\r\n```\r\nWhile I would suggest storing the `raw_val` as an array of bytes (`std::byte`, `char` or `unsigned char`) and using `memcpy` to initialize `val`, I am unsure as of the semantics of this function.","created_at":"2018-05-19T02:46:03Z","updated_at":"2018-05-19T18:10:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"020d564dbefab8b19e0d020ad1e67ce6e42c2a8d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Z3Prover/z3/pulls/1630/commits","review_comments_url":"https://api.github.com/repos/Z3Prover/z3/pulls/1630/comments","review_comment_url":"https://api.github.com/repos/Z3Prover/z3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Z3Prover/z3/issues/1630/comments","statuses_url":"https://api.github.com/repos/Z3Prover/z3/statuses/5315a01b7a9e484f01e23c911869d4e1d94b196b","head":{"label":"danielschemmel:warnings","ref":"warnings","sha":"5315a01b7a9e484f01e23c911869d4e1d94b196b","user":{"login":"danielschemmel","id":2600215,"avatar_url":"https://avatars1.githubusercontent.com/u/2600215?v=4","gravatar_id":"","url":"https://api.github.com/users/danielschemmel","html_url":"https://github.com/danielschemmel","followers_url":"https://api.github.com/users/danielschemmel/followers","following_url":"https://api.github.com/users/danielschemmel/following{/other_user}","gists_url":"https://api.github.com/users/danielschemmel/gists{/gist_id}","starred_url":"https://api.github.com/users/danielschemmel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielschemmel/subscriptions","organizations_url":"https://api.github.com/users/danielschemmel/orgs","repos_url":"https://api.github.com/users/danielschemmel/repos","events_url":"https://api.github.com/users/danielschemmel/events{/privacy}","received_events_url":"https://api.github.com/users/danielschemmel/received_events","type":"User","site_admin":false},"repo":{"id":134022561,"name":"z3","full_name":"danielschemmel/z3","owner":{"login":"danielschemmel","id":2600215,"avatar_url":"https://avatars1.githubusercontent.com/u/2600215?v=4","gravatar_id":"","url":"https://api.github.com/users/danielschemmel","html_url":"https://github.com/danielschemmel","followers_url":"https://api.github.com/users/danielschemmel/followers","following_url":"https://api.github.com/users/danielschemmel/following{/other_user}","gists_url":"https://api.github.com/users/danielschemmel/gists{/gist_id}","starred_url":"https://api.github.com/users/danielschemmel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielschemmel/subscriptions","organizations_url":"https://api.github.com/users/danielschemmel/orgs","repos_url":"https://api.github.com/users/danielschemmel/repos","events_url":"https://api.github.com/users/danielschemmel/events{/privacy}","received_events_url":"https://api.github.com/users/danielschemmel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielschemmel/z3","description":"The Z3 Theorem Prover","fork":true,"url":"https://api.github.com/repos/danielschemmel/z3","forks_url":"https://api.github.com/repos/danielschemmel/z3/forks","keys_url":"https://api.github.com/repos/danielschemmel/z3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielschemmel/z3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielschemmel/z3/teams","hooks_url":"https://api.github.com/repos/danielschemmel/z3/hooks","issue_events_url":"https://api.github.com/repos/danielschemmel/z3/issues/events{/number}","events_url":"https://api.github.com/repos/danielschemmel/z3/events","assignees_url":"https://api.github.com/repos/danielschemmel/z3/assignees{/user}","branches_url":"https://api.github.com/repos/danielschemmel/z3/branches{/branch}","tags_url":"https://api.github.com/repos/danielschemmel/z3/tags","blobs_url":"https://api.github.com/repos/danielschemmel/z3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielschemmel/z3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielschemmel/z3/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielschemmel/z3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielschemmel/z3/statuses/{sha}","languages_url":"https://api.github.com/repos/danielschemmel/z3/languages","stargazers_url":"https://api.github.com/repos/danielschemmel/z3/stargazers","contributors_url":"https://api.github.com/repos/danielschemmel/z3/contributors","subscribers_url":"https://api.github.com/repos/danielschemmel/z3/subscribers","subscription_url":"https://api.github.com/repos/danielschemmel/z3/subscription","commits_url":"https://api.github.com/repos/danielschemmel/z3/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielschemmel/z3/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielschemmel/z3/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielschemmel/z3/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielschemmel/z3/contents/{+path}","compare_url":"https://api.github.com/repos/danielschemmel/z3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielschemmel/z3/merges","archive_url":"https://api.github.com/repos/danielschemmel/z3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielschemmel/z3/downloads","issues_url":"https://api.github.com/repos/danielschemmel/z3/issues{/number}","pulls_url":"https://api.github.com/repos/danielschemmel/z3/pulls{/number}","milestones_url":"https://api.github.com/repos/danielschemmel/z3/milestones{/number}","notifications_url":"https://api.github.com/repos/danielschemmel/z3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielschemmel/z3/labels{/name}","releases_url":"https://api.github.com/repos/danielschemmel/z3/releases{/id}","deployments_url":"https://api.github.com/repos/danielschemmel/z3/deployments","created_at":"2018-05-19T02:28:26Z","updated_at":"2018-05-19T02:28:33Z","pushed_at":"2018-05-19T02:39:52Z","git_url":"git://github.com/danielschemmel/z3.git","ssh_url":"git@github.com:danielschemmel/z3.git","clone_url":"https://github.com/danielschemmel/z3.git","svn_url":"https://github.com/danielschemmel/z3","homepage":null,"size":26903,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Z3Prover:master","ref":"master","sha":"ad973d5c6d64ba29be866c5643c2b9575ee8adca","user":{"login":"Z3Prover","id":11668813,"avatar_url":"https://avatars1.githubusercontent.com/u/11668813?v=4","gravatar_id":"","url":"https://api.github.com/users/Z3Prover","html_url":"https://github.com/Z3Prover","followers_url":"https://api.github.com/users/Z3Prover/followers","following_url":"https://api.github.com/users/Z3Prover/following{/other_user}","gists_url":"https://api.github.com/users/Z3Prover/gists{/gist_id}","starred_url":"https://api.github.com/users/Z3Prover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Z3Prover/subscriptions","organizations_url":"https://api.github.com/users/Z3Prover/orgs","repos_url":"https://api.github.com/users/Z3Prover/repos","events_url":"https://api.github.com/users/Z3Prover/events{/privacy}","received_events_url":"https://api.github.com/users/Z3Prover/received_events","type":"Organization","site_admin":false},"repo":{"id":32944298,"name":"z3","full_name":"Z3Prover/z3","owner":{"login":"Z3Prover","id":11668813,"avatar_url":"https://avatars1.githubusercontent.com/u/11668813?v=4","gravatar_id":"","url":"https://api.github.com/users/Z3Prover","html_url":"https://github.com/Z3Prover","followers_url":"https://api.github.com/users/Z3Prover/followers","following_url":"https://api.github.com/users/Z3Prover/following{/other_user}","gists_url":"https://api.github.com/users/Z3Prover/gists{/gist_id}","starred_url":"https://api.github.com/users/Z3Prover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Z3Prover/subscriptions","organizations_url":"https://api.github.com/users/Z3Prover/orgs","repos_url":"https://api.github.com/users/Z3Prover/repos","events_url":"https://api.github.com/users/Z3Prover/events{/privacy}","received_events_url":"https://api.github.com/users/Z3Prover/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Z3Prover/z3","description":"The Z3 Theorem Prover","fork":false,"url":"https://api.github.com/repos/Z3Prover/z3","forks_url":"https://api.github.com/repos/Z3Prover/z3/forks","keys_url":"https://api.github.com/repos/Z3Prover/z3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Z3Prover/z3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Z3Prover/z3/teams","hooks_url":"https://api.github.com/repos/Z3Prover/z3/hooks","issue_events_url":"https://api.github.com/repos/Z3Prover/z3/issues/events{/number}","events_url":"https://api.github.com/repos/Z3Prover/z3/events","assignees_url":"https://api.github.com/repos/Z3Prover/z3/assignees{/user}","branches_url":"https://api.github.com/repos/Z3Prover/z3/branches{/branch}","tags_url":"https://api.github.com/repos/Z3Prover/z3/tags","blobs_url":"https://api.github.com/repos/Z3Prover/z3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Z3Prover/z3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Z3Prover/z3/git/refs{/sha}","trees_url":"https://api.github.com/repos/Z3Prover/z3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Z3Prover/z3/statuses/{sha}","languages_url":"https://api.github.com/repos/Z3Prover/z3/languages","stargazers_url":"https://api.github.com/repos/Z3Prover/z3/stargazers","contributors_url":"https://api.github.com/repos/Z3Prover/z3/contributors","subscribers_url":"https://api.github.com/repos/Z3Prover/z3/subscribers","subscription_url":"https://api.github.com/repos/Z3Prover/z3/subscription","commits_url":"https://api.github.com/repos/Z3Prover/z3/commits{/sha}","git_commits_url":"https://api.github.com/repos/Z3Prover/z3/git/commits{/sha}","comments_url":"https://api.github.com/repos/Z3Prover/z3/comments{/number}","issue_comment_url":"https://api.github.com/repos/Z3Prover/z3/issues/comments{/number}","contents_url":"https://api.github.com/repos/Z3Prover/z3/contents/{+path}","compare_url":"https://api.github.com/repos/Z3Prover/z3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Z3Prover/z3/merges","archive_url":"https://api.github.com/repos/Z3Prover/z3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Z3Prover/z3/downloads","issues_url":"https://api.github.com/repos/Z3Prover/z3/issues{/number}","pulls_url":"https://api.github.com/repos/Z3Prover/z3/pulls{/number}","milestones_url":"https://api.github.com/repos/Z3Prover/z3/milestones{/number}","notifications_url":"https://api.github.com/repos/Z3Prover/z3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Z3Prover/z3/labels{/name}","releases_url":"https://api.github.com/repos/Z3Prover/z3/releases{/id}","deployments_url":"https://api.github.com/repos/Z3Prover/z3/deployments","created_at":"2015-03-26T18:16:07Z","updated_at":"2018-05-19T18:08:28Z","pushed_at":"2018-05-19T18:08:24Z","git_url":"git://github.com/Z3Prover/z3.git","ssh_url":"git@github.com:Z3Prover/z3.git","clone_url":"https://github.com/Z3Prover/z3.git","svn_url":"https://github.com/Z3Prover/z3","homepage":null,"size":26767,"stargazers_count":3052,"watchers_count":3052,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":544,"mirror_url":null,"archived":false,"open_issues_count":165,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":544,"open_issues":165,"watchers":3052,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Z3Prover/z3/pulls/1630"},"html":{"href":"https://github.com/Z3Prover/z3/pull/1630"},"issue":{"href":"https://api.github.com/repos/Z3Prover/z3/issues/1630"},"comments":{"href":"https://api.github.com/repos/Z3Prover/z3/issues/1630/comments"},"review_comments":{"href":"https://api.github.com/repos/Z3Prover/z3/pulls/1630/comments"},"review_comment":{"href":"https://api.github.com/repos/Z3Prover/z3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Z3Prover/z3/pulls/1630/commits"},"statuses":{"href":"https://api.github.com/repos/Z3Prover/z3/statuses/5315a01b7a9e484f01e23c911869d4e1d94b196b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"NikolajBjorner"}}