{"action":"opened","issue":{"url":"https://api.github.com/repos/ziglang/zig/issues/1762","repository_url":"https://api.github.com/repos/ziglang/zig","labels_url":"https://api.github.com/repos/ziglang/zig/issues/1762/labels{/name}","comments_url":"https://api.github.com/repos/ziglang/zig/issues/1762/comments","events_url":"https://api.github.com/repos/ziglang/zig/issues/1762/events","html_url":"https://github.com/ziglang/zig/issues/1762","id":382864800,"node_id":"MDU6SXNzdWUzODI4NjQ4MDA=","number":1762,"title":"untagged union's debug tag is still present in release modes","user":{"login":"tgschultz","id":12647796,"node_id":"MDQ6VXNlcjEyNjQ3Nzk2","avatar_url":"https://avatars2.githubusercontent.com/u/12647796?v=4","gravatar_id":"","url":"https://api.github.com/users/tgschultz","html_url":"https://github.com/tgschultz","followers_url":"https://api.github.com/users/tgschultz/followers","following_url":"https://api.github.com/users/tgschultz/following{/other_user}","gists_url":"https://api.github.com/users/tgschultz/gists{/gist_id}","starred_url":"https://api.github.com/users/tgschultz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgschultz/subscriptions","organizations_url":"https://api.github.com/users/tgschultz/orgs","repos_url":"https://api.github.com/users/tgschultz/repos","events_url":"https://api.github.com/users/tgschultz/events{/privacy}","received_events_url":"https://api.github.com/users/tgschultz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-20T21:57:53Z","updated_at":"2018-11-20T21:57:53Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Untagged (but not extern) unions have a hidden tag field in debug modes. However this tag field is still present in release modes when it aught not to be:\r\n\r\n```\r\n//built with release-fast\r\npub fn main() void {\r\n    const U = union{ One: u8, Two: u32,};\r\n    const bytes = std.mem.toBytes(U{.Two = std.math.maxInt(u32)});\r\n    debug.warn(\"bytes: \");\r\n    for(bytes) |b| debug.warn(\"{},\", b);\r\n    debug.warn(\"\\nsize: {}\\n\", usize(@sizeOf(U)));\r\n}\r\n```\r\n```\r\nbytes: 255,255,255,255,1,0,0,0,\r\nsize: 8\r\n```"}}
{"actor":{"display_login":"tgschultz"}}