3.2.3.4 Structures and unions

C++ Class: gccjit::struct_

A compound type analagous to a C struct.

gccjit;;struct_ is a subclass of gccjit;;type (and thus of gccjit;;object in turn).

C++ Class: gccjit::field

A field within a gccjit;;struct_.

gccjit;;field is a subclass of gccjit;;object.

You can model C struct types by creating gccjit;;struct_ and gccjit;;field instances, in either order:

C++ Function: gccjit::field gccjit::context::new_field (gccjit::type type, const char *name, gccjit::location loc)

Construct a new field, with the given type and name.

C++ Function: gccjit::struct_ gccjit::context::new_struct_type (const std::string &name, std::vector<field> &fields, gccjit::location loc)

Construct a new struct type, with the given name and fields.

C++ Function: gccjit::struct_ gccjit::context::new_opaque_struct (const std::string &name, gccjit::location loc)

Construct a new struct type, with the given name, but without specifying the fields. The fields can be omitted (in which case the size of the struct is not known), or later specified using gcc_jit_struct_set_fields().