Another question on X3J11 proposal

Larry Cipriani lvc at danews.ATT.COM
Mon Dec 15 04:35:35 AEST 1986


Does the X3J11 proposal allow reuse of names in the following manner?

main(argc, argv)
	int argc;	/* first argc */
	char *argc[];
{
	int argc;	/* second argc */

	printf("argc = %d\n", argc);
}

3 PDP 11/70 compilers I use give the message 'argc redeclared' and
abort. A 3B5 and 3B2 compiler I use allow this.  I believe that the
PDP compilers are correct and the 3b compilers are broken.

Is the scope of the 'second argc' (an automatic) the same as that of
the 'first argc' (a function paramter)?

If the X3J11 proposal allows this I wish to register a formal complaint.
Who do I contact?

-- 

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



More information about the Comp.lang.c mailing list