Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site utcsri.UUCP Path: utzoo!utcsri!greg From: greg@utcsri.UUCP (Gregory Smith) Newsgroups: comp.lang.c Subject: Re: Why are typedef names in the same name space as variable names? Message-ID: <3723@utcsri.UUCP> Date: Wed, 3-Dec-86 18:13:48 EST Article-I.D.: utcsri.3723 Posted: Wed Dec 3 18:13:48 1986 Date-Received: Wed, 3-Dec-86 18:45:27 EST References: <1092@spice.cs.cmu.edu> <307@cartan.Berkeley.EDU> Reply-To: greg@utcsri.UUCP (Gregory Smith) Distribution: net Organization: CSRI, University of Toronto Lines: 23 Summary: In article <4743@ism780c.UUCP> tim@ism780c.UUCP (Tim Smith) writes: >>Declarations inside blocks must specify a type or a storage class. I >>am not saying that this is perfectly consistent; however it is >>thoroughly documented. > >Where is this documented? K&R say that the type may be left out of >declarations ( giving "int" as the default ). And they mention a >problem explicitly with typedefs. I don't see anywhere that says I >must specify a type in other cases ( on the other hand, I haven't looked >very hard. I may have missed it. ). Well, I take this back. Can't find it in K&R anywhere. It should be mentioned on page 201 in 9.2, especially. It *has* to be a rule, since there are umpteem valid declarations that become valid statements when you don't give a storage class or type: int i=1; extern foo(); etc. -- ---------------------------------------------------------------------- Greg Smith University of Toronto UUCP: ..utzoo!utcsri!greg Have vAX, will hack...