{"action":"created","issue":{"url":"https://api.github.com/repos/diffblue/cbmc/issues/1353","repository_url":"https://api.github.com/repos/diffblue/cbmc","labels_url":"https://api.github.com/repos/diffblue/cbmc/issues/1353/labels{/name}","comments_url":"https://api.github.com/repos/diffblue/cbmc/issues/1353/comments","events_url":"https://api.github.com/repos/diffblue/cbmc/issues/1353/events","html_url":"https://github.com/diffblue/cbmc/issues/1353","id":255534893,"number":1353,"title":"32-bit builds with warnings as errors are broken","user":{"login":"reuk","id":3016418,"avatar_url":"https://avatars1.githubusercontent.com/u/3016418?v=4","gravatar_id":"","url":"https://api.github.com/users/reuk","html_url":"https://github.com/reuk","followers_url":"https://api.github.com/users/reuk/followers","following_url":"https://api.github.com/users/reuk/following{/other_user}","gists_url":"https://api.github.com/users/reuk/gists{/gist_id}","starred_url":"https://api.github.com/users/reuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reuk/subscriptions","organizations_url":"https://api.github.com/users/reuk/orgs","repos_url":"https://api.github.com/users/reuk/repos","events_url":"https://api.github.com/users/reuk/events{/privacy}","received_events_url":"https://api.github.com/users/reuk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-09-06T09:16:15Z","updated_at":"2017-12-04T13:14:57Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Currently it is not possible to produce a 32-bit build of CBMC with `-Wall -Wpedantic -Werror` set. This is because there is a cast from `2<<32` to `size_t` which gets truncated to `0` on 32-bit platforms (in `interpreter.cpp`).\r\n\r\nThere have been several attempts to fix this problem.\r\n\r\nThe first attempt, #987, solves the problem by reducing the shift amount to `1<<32`. It is not clear why this PR was not accepted.\r\n\r\nThe second attempt, #1330, keeps the shift amount at `2<<32` and attempts to solve the problem by using `mp_integer` wherever possible in the interpreter in order to avoid truncation altogether. However, to facilitate minimal changes in this patch, the binary operators in `mp_integer` had to be changed to allow conversions on both sides of operators (it's surprising to have `BigInt + size_t` work, but `size_t + BigInt` result in a compile error - associative operators should be *really* associative). As a result, #1330 depends on #1341.\r\n\r\nThere were concerns about the performance implications of the new `mp_integer` operators in #1341, which may introduce conversions which weren't required before. It is not practical for me to build a benchmarking suite (this would be an enormous undertaking and I do not have the necessary expertise in either benchmarking or the customer requirements), and so #1341 will not be merge-able in the near future."},"comment":{"url":"https://api.github.com/repos/diffblue/cbmc/issues/comments/348958820","html_url":"https://github.com/diffblue/cbmc/issues/1353#issuecomment-348958820","issue_url":"https://api.github.com/repos/diffblue/cbmc/issues/1353","id":348958820,"user":{"login":"reuk","id":3016418,"avatar_url":"https://avatars1.githubusercontent.com/u/3016418?v=4","gravatar_id":"","url":"https://api.github.com/users/reuk","html_url":"https://github.com/reuk","followers_url":"https://api.github.com/users/reuk/followers","following_url":"https://api.github.com/users/reuk/following{/other_user}","gists_url":"https://api.github.com/users/reuk/gists{/gist_id}","starred_url":"https://api.github.com/users/reuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reuk/subscriptions","organizations_url":"https://api.github.com/users/reuk/orgs","repos_url":"https://api.github.com/users/reuk/repos","events_url":"https://api.github.com/users/reuk/events{/privacy}","received_events_url":"https://api.github.com/users/reuk/received_events","type":"User","site_admin":false},"created_at":"2017-12-04T13:14:57Z","updated_at":"2017-12-04T13:14:57Z","author_association":"CONTRIBUTOR","body":"The following completes without any problems. Hopefully it's enough to resolve this issue.\r\n```\r\n$ cmake -H. -Bbuild-32-release -GNinja -DCMAKE_BUILD_TYPE=Release '-DCMAKE_CXX_FLAGS=-m32'\r\n$ cmake --build build-32-release\r\n```"}}
{"actor":{"display_login":"reuk"}}