Next: Arrays, Previous: Slices, Up: The type section [Contents][Index]
Pointers, typedefs, and const, volatile and restrict
qualifiers are represented identically except for their type kind (though they
may be treated differently by consuming libraries like libctf, since
pointers affect assignment-compatibility in ways cvr-quals do not, and they may
have different alignment requirements, etc).
All of these are represented by ctf_stype_t, have no variable data at
all, and populate ctt_type with the type ID of the type they point
to. These types can stack: a CTF_K_RESTRICT can point to a
CTF_K_CONST which can point to a CTF_K_POINTER etc.
They are all unnamed: ctt_name is 0.
The size of CTF_K_POINTER is derived from the data model (see section Data models), i.e. in practice, from the target machine ABI, and is not explicitly
represented. The size of other kinds in this set should be determined by
chasing ctf_types as necessary until a non-typedef/const/volatile/restrict is
found, and using that.