1 #include <stdarg.h> 2 #include <stdbool.h> 3 #include <stdint.h> 4 #include <stdlib.h> 5 6 enum C 7 #ifdef __cplusplus 8 : uint32_t 9 #endif // __cplusplus 10 { 11 X = 2, 12 Y, 13 }; 14 #ifndef __cplusplus 15 typedef uint32_t C; 16 #endif // __cplusplus 17 18 typedef struct A { 19 int32_t m0; 20 } A; 21 22 typedef struct B { 23 int32_t x; 24 float y; 25 } B; 26 27 enum F_Tag 28 #ifdef __cplusplus 29 : uint8_t 30 #endif // __cplusplus 31 { 32 Foo, 33 Bar, 34 Baz, 35 }; 36 #ifndef __cplusplus 37 typedef uint8_t F_Tag; 38 #endif // __cplusplus 39 40 typedef struct Foo_Body { 41 F_Tag tag; 42 int16_t _0; 43 } Foo_Body; 44 45 typedef struct Bar_Body { 46 F_Tag tag; 47 uint8_t x; 48 int16_t y; 49 } Bar_Body; 50 51 typedef union F { 52 F_Tag tag; 53 Foo_Body foo; 54 Bar_Body bar; 55 } F; 56 57 enum H_Tag 58 #ifdef __cplusplus 59 : uint8_t 60 #endif // __cplusplus 61 { 62 Hello, 63 There, 64 Everyone, 65 }; 66 #ifndef __cplusplus 67 typedef uint8_t H_Tag; 68 #endif // __cplusplus 69 70 typedef struct Hello_Body { 71 int16_t _0; 72 } Hello_Body; 73 74 typedef struct There_Body { 75 uint8_t x; 76 int16_t y; 77 } There_Body; 78 79 typedef struct H { 80 H_Tag tag; 81 union { 82 Hello_Body hello; 83 There_Body there; 84 }; 85 } H; 86 87 #ifdef __cplusplus 88 extern "C" { 89 #endif // __cplusplus 90 91 void root(A x, B y, C z, F f, H h); 92 93 #ifdef __cplusplus 94 } // extern "C" 95 #endif // __cplusplus 96