can "a;" be a declaration?
John Gilmore
gnu at hoptoad.uucp
Tue Dec 2 20:44:16 AEST 1986
In article <3692 at utcsri.UUCP>, greg at utcsri.UUCP (Gregory Smith) writes:
> In article <4647 at ism780c.UUCP> tim at 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 at 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!
More information about the Comp.lang.c
mailing list