{"action":"opened","issue":{"url":"https://api.github.com/repos/LADSoft/OrangeC/issues/47","repository_url":"https://api.github.com/repos/LADSoft/OrangeC","labels_url":"https://api.github.com/repos/LADSoft/OrangeC/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/LADSoft/OrangeC/issues/47/comments","events_url":"https://api.github.com/repos/LADSoft/OrangeC/issues/47/events","html_url":"https://github.com/LADSoft/OrangeC/issues/47","id":271555707,"number":47,"title":"alignof may return -1","user":{"login":"tenk-a","id":6330975,"avatar_url":"https://avatars1.githubusercontent.com/u/6330975?v=4","gravatar_id":"","url":"https://api.github.com/users/tenk-a","html_url":"https://github.com/tenk-a","followers_url":"https://api.github.com/users/tenk-a/followers","following_url":"https://api.github.com/users/tenk-a/following{/other_user}","gists_url":"https://api.github.com/users/tenk-a/gists{/gist_id}","starred_url":"https://api.github.com/users/tenk-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenk-a/subscriptions","organizations_url":"https://api.github.com/users/tenk-a/orgs","repos_url":"https://api.github.com/users/tenk-a/repos","events_url":"https://api.github.com/users/tenk-a/events{/privacy}","received_events_url":"https://api.github.com/users/tenk-a/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-06T17:24:25Z","updated_at":"2017-11-06T17:24:25Z","closed_at":null,"author_association":"NONE","body":"The result of alignof of class|struct without member variable becomes -1.\r\n(v6.0.30.1)\r\n\r\nsmp.cpp:\r\n```\r\n#include <stdio.h>\r\nstruct S1 {\r\n    bool b;\r\n};\r\nstruct S2 {\r\n};\r\nstruct S3 {\r\n    virtual ~S3() {}\r\n};\r\nint main() {\r\n    printf(\"sizeof(S1)=%d  alignof(S1)=%d\\n\", int(sizeof(S1)), int(alignof(S1)));\r\n    printf(\"sizeof(S2)=%d  alignof(S2)=%d\\n\", int(sizeof(S2)), int(alignof(S2)));\r\n    printf(\"sizeof(S3)=%d  alignof(S3)=%d\\n\", int(sizeof(S3)), int(alignof(S3)));\r\n}\r\n```\r\nRESULT:\r\nsizeof(S1)=1  alignof(S1)=1\r\nsizeof(S2)=4  alignof(S2)=-1\r\nsizeof(S3)=4  alignof(S3)=-1\r\n"}}
{"actor":{"display_login":"tenk-a"}}