Fix parsing attributes for struct decls
commit2b618c1ab4b9a4b8bd9c362cff070fa40cd03353
authorMichael Matz <matz@suse.de>
Mon, 11 Jul 2016 16:38:00 +0000 (11 18:38 +0200)
committerMichael Matz <matz@suse.de>
Thu, 15 Dec 2016 16:47:08 +0000 (15 17:47 +0100)
tree44e92b1b1b45f937656278baf2f3cb726ff147a1
parent7e515466246b30f02867fc1f1902dea706ff31af
Fix parsing attributes for struct decls

Given this code:

  struct __attribute__((...)) Name {...};

TCC was eating "Name", hence generating an anonymous struct.
It also didn't apply any packed attributes to the parsed
members.  Both fixed.  The testcase also contains a case
that isn't yet handled by TCC (under a BROKEN #define).
tccgen.c
tests/tcctest.c