Line
typedef struct foo dne;
implicitly declares a struct (incomplete at this point) struct foo structure. A pointer to an incomplete type is a full type, for example, its size is known, and you can declare an object of this type. However, struct foo not complete until you provide its full declaration, for example,
dne dne_var;
or dereferencing your pointer to access structure fields will be invalid.
mafso source share