Another question on X3J11 proposal (nevermind)

Larry Cipriani lvc at danews.ATT.COM
Tue Dec 16 23:25:02 AEST 1986


> Does the X3J11 proposal allow reuse of names in the following manner?
> main(argc, argv) int argc; char *argc[]; /* first argc */ {
> 	int argc;	/* second argc */
> 	printf("argc = %d\n", argc);
> }

Since posting this I've learned that 1) this is has
been addressed in the X3J11 proposal (the scope of
parameters is determined as if they were automatics
declared at the beginning of the first block), 2)
that because of an ambiguity in K&R a compiler may
allow this (yuck!) or not.
-- 

Larry Cipriani	AT&T Network Systems
cbosgd!{danews,cbsck}!lvc



More information about the Comp.lang.c mailing list