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

Declarations

Certain declarations can use incomplete types, but others require (complete) object types. Those declarations that require object types are array elements, members of structures or unions, and objects local to a function. All other declarations permit incomplete types. In particular, the following are permitted:

The function return and parameter types are special. Except for void, an incomplete type used in such a manner must be completed by the time the function is defined or called. (A return type of void specifies a function that returns no value and a single parameter type of void specifies a function that accepts no arguments.)

Note that since array and function parameter types are rewritten to be pointer types, a seemingly incomplete array parameter type is not actually incomplete. The typical declaration of main's argv (namely, char *argv[]) as an unspecified length array of character pointers, is rewritten to be a pointer to character pointers.


Next topic: Expressions
Previous topic: Completing incomplete types

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