Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!utfyzx!sq!msb From: msb@sq.UUCP Newsgroups: comp.lang.c Subject: typedef Message-ID: <1987Apr20.130727.7594@sq.uucp> Date: Mon, 20-Apr-87 13:07:27 EST Article-I.D.: sq.1987Apr20.130727.7594 Posted: Mon Apr 20 13:07:27 1987 Date-Received: Wed, 22-Apr-87 03:27:11 EST References: <764@hoqax.UUCP> Reply-To: msb@sq.UUCP (Mark Brader) Organization: SoftQuad Inc., Toronto Lines: 15 Checksum: 51615 Summary: defines a synonym for an existing type BEATTIE (twb@hoqax.UUCP) made one slip in a recent article: > Remember that ... typedef defines a new type. Actually, typedef defines a new synonym for a type. Reference: K&R page 200; ANSI draft section 3.5.5. This means that f() {extern int *a; ...} typedef int *IP; IP a; is legal, and so is typedef int *IP; IP x; x = (int *) malloc (...); even under "draft ANSI C". Mark Brader