DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Complying with standard C

Justification

C would have been simpler without incomplete types. However, they are necessary for void, and there is one feature provided by incomplete types that C has no other way to handle, and that has to do with forward references to structures and unions. If one has two structures that need pointers to each other, the only way to do so (without resorting to potentially invalid casts) 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.
Next topic: Examples
Previous topic: Expressions

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005