Added test for anonymous structs and unions
This commit is contained in:
parent
33eeb66ea2
commit
3648680f28
1 changed files with 27 additions and 0 deletions
27
compiler/c2nim/tests/struct_anonym.h
Normal file
27
compiler/c2nim/tests/struct_anonym.h
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
struct normal{
|
||||||
|
int a;
|
||||||
|
int b;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct outerStruct {
|
||||||
|
struct normal a_nomal_one;
|
||||||
|
|
||||||
|
int a;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
union {
|
||||||
|
int b;
|
||||||
|
} a_union_in_the_struct;
|
||||||
|
|
||||||
|
int c;
|
||||||
|
};
|
||||||
|
|
||||||
|
union {
|
||||||
|
int d;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
int e;
|
||||||
|
} a_struct_in_the_union;
|
||||||
|
} a_union;
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue