{"action":"created","issue":{"url":"https://api.github.com/repos/ldc-developers/ldc/issues/1214","labels_url":"https://api.github.com/repos/ldc-developers/ldc/issues/1214/labels{/name}","comments_url":"https://api.github.com/repos/ldc-developers/ldc/issues/1214/comments","events_url":"https://api.github.com/repos/ldc-developers/ldc/issues/1214/events","html_url":"https://github.com/ldc-developers/ldc/pull/1214","id":117248626,"number":1214,"title":"Fix explicit alignment of local variables","user":{"login":"JohanEngelen","id":10983051,"avatar_url":"https://avatars.githubusercontent.com/u/10983051?v=3","gravatar_id":"","url":"https://api.github.com/users/JohanEngelen","html_url":"https://github.com/JohanEngelen","followers_url":"https://api.github.com/users/JohanEngelen/followers","following_url":"https://api.github.com/users/JohanEngelen/following{/other_user}","gists_url":"https://api.github.com/users/JohanEngelen/gists{/gist_id}","starred_url":"https://api.github.com/users/JohanEngelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohanEngelen/subscriptions","organizations_url":"https://api.github.com/users/JohanEngelen/orgs","repos_url":"https://api.github.com/users/JohanEngelen/repos","events_url":"https://api.github.com/users/JohanEngelen/events{/privacy}","received_events_url":"https://api.github.com/users/JohanEngelen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-17T00:06:25Z","updated_at":"2015-11-17T23:08:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ldc-developers/ldc/pulls/1214","html_url":"https://github.com/ldc-developers/ldc/pull/1214","diff_url":"https://github.com/ldc-developers/ldc/pull/1214.diff","patch_url":"https://github.com/ldc-developers/ldc/pull/1214.patch"},"body":"This fixes the remaining problem of issue #1154, explicit (overriding) alignment of local variables.\r\n\r\nIt's the first time I look at the parser code, so please review carefully.\r\nWhat it looks like to me is that the attributes found on line 3804 are forgotten and not applied to normal local variables without initializers (the last part of the function). So I added code that applies the AlignDeclaration to the declaration, following a pattern found elsewhere in this function. Perhaps we also need to add the other attributes (except linkage?):\r\n```C++\r\n        if (storage_class)\r\n        {\r\n            Dsymbol *s = new StorageClassDeclaration(storage_class, a);\r\n            a = new Dsymbols();\r\n            a->push(s);\r\n        }\r\n        if (structalign != 0)\r\n        {\r\n            Dsymbol *s = new AlignDeclaration(structalign, a);\r\n            a = new Dsymbols();\r\n            a->push(s);\r\n        }\r\n        if (udas)\r\n        {\r\n            Dsymbol *s = new UserAttributeDeclaration(udas, a);\r\n            a = new Dsymbols();\r\n            a->push(s);\r\n        }\r\n``` \r\n\r\n@kinke: this was fun to figure out :) hope you haven't been working on it too."},"comment":{"url":"https://api.github.com/repos/ldc-developers/ldc/issues/comments/157539368","html_url":"https://github.com/ldc-developers/ldc/pull/1214#issuecomment-157539368","issue_url":"https://api.github.com/repos/ldc-developers/ldc/issues/1214","id":157539368,"user":{"login":"JohanEngelen","id":10983051,"avatar_url":"https://avatars.githubusercontent.com/u/10983051?v=3","gravatar_id":"","url":"https://api.github.com/users/JohanEngelen","html_url":"https://github.com/JohanEngelen","followers_url":"https://api.github.com/users/JohanEngelen/followers","following_url":"https://api.github.com/users/JohanEngelen/following{/other_user}","gists_url":"https://api.github.com/users/JohanEngelen/gists{/gist_id}","starred_url":"https://api.github.com/users/JohanEngelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohanEngelen/subscriptions","organizations_url":"https://api.github.com/users/JohanEngelen/orgs","repos_url":"https://api.github.com/users/JohanEngelen/repos","events_url":"https://api.github.com/users/JohanEngelen/events{/privacy}","received_events_url":"https://api.github.com/users/JohanEngelen/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T23:08:58Z","updated_at":"2015-11-17T23:08:58Z","body":"Judging from comment 10 here: https://issues.dlang.org/show_bug.cgi?id=2278#c10\r\nThis is a new feature, not a bug ?"}}