pointer to incomplete type?

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Jun 5 02:53:20 AEST 1990


In article <1680 at mcrware.UUCP> jejones at mcrware.UUCP (James Jones) writes:
-how can one safely declare a pointer to an incomplete structure, union, or
-enumerated type?

The type must be complete before any use that depends on it.

-(For that last case, the interpretation of "each enumerated
-type shall be compatible with an integer type" may make a difference--is that
-intended to be
-	"for all enumerated types, there exists an integer type such that..."
-or	"there exists an integer type such that for all enumerated types,..."?)

Each enumerated type is compatible with SOME integer type, but possible
different integer types for different enumerations.  For example, an
enumeration of fewer than 255 members might be implemented using one
byte rather than a full word.



More information about the Comp.std.c mailing list