[comp.lang.c] typedef

msb@sq.UUCP (04/20/87)

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