tccgen.c: Allow type attributes to prefix enum/struct/union name
From gcc docs: "You may also specify attributes between the enum, struct or union tag and the name of the type rather than after the closing brace." Adds `82_attribs_position.c` in `tests/tests2`
This commit is contained in:
14
tests/tests2/82_attribs_position.c
Normal file
14
tests/tests2/82_attribs_position.c
Normal file
@ -0,0 +1,14 @@
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned char uint8_t;
|
||||
|
||||
typedef union Unaligned16a {
|
||||
uint16_t u;
|
||||
uint8_t b[2];
|
||||
} __attribute__((packed)) Unaligned16a;
|
||||
|
||||
typedef union __attribute__((packed)) Unaligned16b {
|
||||
uint16_t u;
|
||||
uint8_t b[2];
|
||||
} Unaligned16b;
|
||||
|
||||
int main () { return 0; }
|
||||
0
tests/tests2/82_attribs_position.expect
Normal file
0
tests/tests2/82_attribs_position.expect
Normal file
Reference in New Issue
Block a user