Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site amdahl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!sun!amdahl!jlm From: jlm@amdahl.UUCP (John Marshall) Newsgroups: net.lang.c Subject: typedefs Message-ID: <521@amdahl.UUCP> Date: Fri, 16-Nov-84 11:27:56 EST Article-I.D.: amdahl.521 Posted: Fri Nov 16 11:27:56 1984 Date-Received: Sun, 18-Nov-84 03:57:27 EST Distribution: net Organization: Amdahl Corp, Sunnyvale CA Lines: 26 Who said typedefs don't have scope? Typedef names are identifiers, and as such have a scope. Section 8.8 (Appendix A, K&R) makes this clear. Also see section 11.1, page 206, which even includes a specific example: typedef float distance; ... { auto int distance; ... Pcc has a problem in this area, but Amdahl's UTS C compiler handles these constructions correctly. Incidently, I believe the following is even correct: .... typedef int foo; { typedef float foo; .... where the identifier refers to type int in the outer block, but to type float in the inner block.