C dialects / Death of =+

59577 wcs at ho95b.UUCP
Tue Jun 19 08:21:43 AEST 1984


Guy Harris gave a good list of C dialects.  One comment he made
was that the System V C compiler "finally put the  old
assignment operators and initialization sequence to death."
I wish this were true; the standard System V C compiler won't
accept these constructs with their old meaning, but  it still
recognizes and rejects them, preventing you from using
identical-looking constructs with different meanings:

$ cat junk.c
main(){
	int i = 1;
	i =-2;   		/* That's i equals negative 2 */
	printf("i=%d\n",i);
	}
$ cc junk.c
"junk.c", line 3: warning: ambiguous assignment: assignment op taken
"junk.c", line 3: old-fashioned assignment operator

I hope this  goes away in System V Release 2; I haven't had a
VR2 system to try it on.

				Bill Stewart
-- 
				Bill Stewart
				AT&T Bell Labs, Holmdel NJ
				...!ihnp4!ho95b!wcs



More information about the Comp.unix.wizards mailing list