https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118034
--- Comment #2 from Basile Starynkevitch <basile at starynkevitch dot net> ---
Two questions related to this bug:
Perhaps in libgccjit a "union" is just a gcc_jit_struct with some extra data
telling that all fields have byte offset 0?
Then the documentation could say how to create such a union type.
Perhaps a union type is genuinely different?
suggested API in C++
in namespace gccjit add a class union_;
and the following functions:
union_ new_union_type (const std::string &name,
std::vector<field> &fields,
location loc = location ());
union_ new_opaque_union_type (const std::string &name,
location loc = location ());
with a method named set_fields like the one for struct_