| 1 |
#include <stdarg.h> |
| 2 |
#include <stdbool.h> |
| 3 |
#include <stdint.h> |
| 4 |
#include <stdlib.h> |
| 5 |
|
| 6 |
typedef struct A { |
| 7 |
int32_t namespace_; |
| 8 |
float float_; |
| 9 |
} A; |
| 10 |
|
| 11 |
typedef struct B { |
| 12 |
int32_t namespace_; |
| 13 |
float float_; |
| 14 |
} B; |
| 15 |
|
| 16 |
enum C_Tag |
| 17 |
#ifdef __cplusplus |
| 18 |
: uint8_t |
| 19 |
#endif // __cplusplus |
| 20 |
{ |
| 21 |
D, |
| 22 |
}; |
| 23 |
#ifndef __cplusplus |
| 24 |
typedef uint8_t C_Tag; |
| 25 |
#endif // __cplusplus |
| 26 |
|
| 27 |
typedef struct D_Body { |
| 28 |
int32_t namespace_; |
| 29 |
float float_; |
| 30 |
} D_Body; |
| 31 |
|
| 32 |
typedef struct C { |
| 33 |
C_Tag tag; |
| 34 |
union { |
| 35 |
D_Body d; |
| 36 |
}; |
| 37 |
} C; |
| 38 |
|
| 39 |
enum E_Tag |
| 40 |
#ifdef __cplusplus |
| 41 |
: uint8_t |
| 42 |
#endif // __cplusplus |
| 43 |
{ |
| 44 |
Double, |
| 45 |
Float, |
| 46 |
}; |
| 47 |
#ifndef __cplusplus |
| 48 |
typedef uint8_t E_Tag; |
| 49 |
#endif // __cplusplus |
| 50 |
|
| 51 |
typedef struct E { |
| 52 |
E_Tag tag; |
| 53 |
union { |
| 54 |
struct { |
| 55 |
double double_; |
| 56 |
}; |
| 57 |
struct { |
| 58 |
float float_; |
| 59 |
}; |
| 60 |
}; |
| 61 |
} E; |
| 62 |
|
| 63 |
enum F_Tag |
| 64 |
#ifdef __cplusplus |
| 65 |
: uint8_t |
| 66 |
#endif // __cplusplus |
| 67 |
{ |
| 68 |
double_, |
| 69 |
float_, |
| 70 |
}; |
| 71 |
#ifndef __cplusplus |
| 72 |
typedef uint8_t F_Tag; |
| 73 |
#endif // __cplusplus |
| 74 |
|
| 75 |
typedef struct F { |
| 76 |
F_Tag tag; |
| 77 |
union { |
| 78 |
struct { |
| 79 |
double double_; |
| 80 |
}; |
| 81 |
struct { |
| 82 |
float float_; |
| 83 |
}; |
| 84 |
}; |
| 85 |
} F; |
| 86 |
|
| 87 |
#ifdef __cplusplus |
| 88 |
extern "C" { |
| 89 |
#endif // __cplusplus |
| 90 |
|
| 91 |
void root(struct A a, |
| 92 |
struct B b, |
| 93 |
struct C c, |
| 94 |
struct E e, |
| 95 |
struct F f, |
| 96 |
int32_t namespace_, |
| 97 |
float float_); |
| 98 |
|
| 99 |
#ifdef __cplusplus |
| 100 |
} // extern "C" |
| 101 |
#endif // __cplusplus |