K&R App A, par. 8 & 8.2, on Declarations, Defaulting.

Greg "Bucket" Woods woods at hao.UUCP
Wed Jul 4 16:49:47 AEST 1984


  I don't know what the manual or the standards say, but under no
circumstances should

a = 1;

be allowed as a valid declaration. Gramatically it is indistinguishable
from an assignment statement! If it were the first statement after the
declaration section, should it be flagged as a multiple declaration
error if "a" were declared above as a pointer to something, or should
it assign a pointer of the appropriate type to location 1? If it is legal,
it stinks.

--Greg
-- 
{ucbvax!hplabs | allegra!nbires | decvax!stcvax | harpo!seismo | ihnp4!stcvax}
       		        !hao!woods
   
   "I only want to hold you, I don't want to tie you down"



More information about the Comp.lang.c mailing list