{"action":"closed","issue":{"url":"https://api.github.com/repos/eliben/pycparser/issues/242","repository_url":"https://api.github.com/repos/eliben/pycparser","labels_url":"https://api.github.com/repos/eliben/pycparser/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/eliben/pycparser/issues/242/comments","events_url":"https://api.github.com/repos/eliben/pycparser/issues/242/events","html_url":"https://github.com/eliben/pycparser/issues/242","id":305611322,"number":242,"title":"Generated code not compiling with typedef named struct defining multiple types","user":{"login":"ldore","id":13061643,"avatar_url":"https://avatars2.githubusercontent.com/u/13061643?v=4","gravatar_id":"","url":"https://api.github.com/users/ldore","html_url":"https://github.com/ldore","followers_url":"https://api.github.com/users/ldore/followers","following_url":"https://api.github.com/users/ldore/following{/other_user}","gists_url":"https://api.github.com/users/ldore/gists{/gist_id}","starred_url":"https://api.github.com/users/ldore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldore/subscriptions","organizations_url":"https://api.github.com/users/ldore/orgs","repos_url":"https://api.github.com/users/ldore/repos","events_url":"https://api.github.com/users/ldore/events{/privacy}","received_events_url":"https://api.github.com/users/ldore/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-15T15:51:39Z","updated_at":"2018-03-15T22:07:32Z","closed_at":"2018-03-15T22:07:32Z","author_association":"CONTRIBUTOR","body":"When using a single `typedef struct` that defines multiple types, the parser converts the source to multiple single-type `typedef` nodes.\r\nThis causes problems when using a named `struct`.\r\n\r\nFor example:\r\n```c\r\ntypedef struct MyStruct {\r\n  int a;\r\n} myType, *pMyType;\r\n```\r\ncompiles correctly.\r\n\r\nHowever, once parsed, and written back to C source, we get:\r\n```c\r\ntypedef struct MyStruct {\r\n  int a;\r\n} myType;\r\ntypedef struct MyStruct {\r\n  int a;\r\n} *pMyType;\r\n```\r\nThis does not compile, as `struct MyStruct` is defined twice.\r\n```\r\nerror: redefinition of MyStruct\r\n```"}}
{"actor":{"display_login":"ldore"}}