Incomplete Types

The following are incomplete types:

void is an incomplete type that cannot be completed. Incomplete structure or union and enumeration tags must be completed before being used to declare an object, although you can define a pointer to an incomplete structure or union.

C An array with an unspecified size is an incomplete type. However, if, instead of a constant expression, the array size is specified by [*], indicating a variable length array, the size is considered as having been specified, and the array type is then considered a complete type.

C If the function declarator is not part of a definition of that function, parameters may have incomplete type. The parameters may also have variable length array type, indicated by the [*] notation.

The following examples illustrate incomplete types:

      void *incomplete_ptr;
      struct dimension linear; /* no previous definition of dimension */
 
void is an incomplete type that cannot be completed. Incomplete structure, union, or enumeration tags must be completed before being used to declare an object. However, you can define a pointer to an incomplete structure or union.

Related References

IBM Copyright 2003