Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!hoptoad!gnu From: gnu@hoptoad.uucp (John Gilmore) Newsgroups: comp.lang.c Subject: Re: can "a;" be a declaration? Message-ID: <1387@hoptoad.uucp> Date: Tue, 2-Dec-86 05:44:16 EST Article-I.D.: hoptoad.1387 Posted: Tue Dec 2 05:44:16 1986 Date-Received: Tue, 2-Dec-86 08:19:06 EST References: <1092@spice.cs.cmu.edu> <307@cartan.Berkeley.EDU> <3644@utcsri.UUCP> <3692@utcsri.UUCP> Organization: Nebula Consultants in San Francisco Lines: 20 In article <3692@utcsri.UUCP>, greg@utcsri.UUCP (Gregory Smith) writes: > In article <4647@ism780c.UUCP> tim@ism780c.UUCP (Tim Smith) writes: > > If "a" is a global, they have no problem: > > > > a; > > main() { > > a = 1; > > } > 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. Here the ANSI C draft has fixed things up. ALL declarations must begin with a storage class specifier or a type specifier. No exceptions. So the above example is not valid ANSI C, even though the Unix compilers accept it. I approve of this change. -- John Gilmore {sun,ptsfa,lll-crg,ihnp4}!hoptoad!gnu jgilmore@lll-crg.arpa Call +1 800 854 7179 or +1 714 540 9870 and order X3.159-198x (ANSI C) for $65. Then spend two weeks reading it and weeping. THEN send in formal comments!