While talking about useful additions, how about this one??

Karl Heuer karl at haddock.ISC.COM
Mon Jan 25 07:16:43 AEST 1988


In article <127 at ghostwheel.UUCP> ned at ghostwheel.aca.mcc.com.UUCP (Ned Nowotny) writes:
>... I would like to see "struct *" used as a generic pointer to a structure.
>This is distinct from "void *" in that pointers to structures generally have
>the same alignment constraints in all implementations of which I am aware,

Most implementations I've seen will give a struct the alignment of its
strictest member.  Thus, struct{char} and struct{int} may have different
alignment constraints.  However, I believe the dpANS requires that all struct
pointers must be interchangable anyway, so this does not invalidate your
suggestion.

How would you use such a feature, if you had it?

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list