Path: utzoo!mnetor!uunet!husc6!ut-sally!ghostwheel!ned From: ned@ghostwheel.UUCP (Ned Nowotny) Newsgroups: comp.lang.c Subject: Re: While talking about useful additions, how about this one?? Message-ID: <127@ghostwheel.UUCP> Date: 23 Jan 88 00:58:35 GMT References: <253@vsi1.UUCP> Reply-To: ned@ghostwheel.aca.mcc.com.UUCP (Ned Nowotny) Organization: MCC Database Program, Austin, Texas Lines: 18 And now for something completely different... Given a compiler or lint that would understand the construct and issue warnings about type mismatches, 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, but "char" and "short" frequently have different alignment constraints from other data types. The problem is that "void *" is a pun for all pointers, and pointers for all the other basic types (e.g. char, int, long, etc.) are puns for pointers to any objects of the same type. "struct *" (and maybe even "union *") could provide a similar generality for inhomogeneous aggregate data types. (As opposed to arrays which are homogeneous aggregate data types. Too bad they aren't first class citizens. Well, it's too late now. Or is it? ANSI C maybe? Nahh! ;-) ) -- Ned Nowotny (ned@ghostwheel.aca.mcc.com.UUCP)