Oracle® Solaris Studio 12.4: C User's Guide

Exit Print View

Updated: March 2015
 
 

6.10.5 Justification

Besides void, C has no other way to handle incomplete types: forward references to structures and unions. If two structures need pointers to each other, the only way to do so is with incomplete types:

struct a { struct b *bp; };
struct b { struct a *ap; };

All strongly typed programming languages that have some form of pointer and heterogeneous data types provide some method of handling this case.