[net.bugs.4bsd] i=i*f vs. i*=f--lint change

ado@elsie.UUCP (04/19/84)

Thanks to all who responded to my question, both with articles and by mail.
Thanks especially for the reposting of the bug fix.

Of course, portability buffs will want to be aware that the result of
	i *= f
is different with different compilers, and avoid using the construct
in code that's designed to be portable.
I think that "lint" can be changed to pick up the construct.
Here's my first try at changing the 4.1 Big Software Deal version of "lint.c";
I'm sure someone else out there can do better.
The change is to the function "clocal"; it's between the #ifndef and #endif:

		switch( o = p->in.op ){

	#ifndef OLDVERSION
		case ASG MUL:
			if (pflag && p->in.right->in.op == SCONV)
				werror( "mixed-mode *= may surprise you");
			break;
		case ASG DIV:
			if (pflag && p->in.right->in.op == SCONV)
				werror( "mixed-mode /= may surprise you");
			break;
	#endif
--
UNIX is an AT&T Bell Laboratories trademark.  (Thanks to "whuxj!abm" for a note
on "AT&T Bell Laboratories" being the AT&T-desired form of reference.)
-- 
UUCP:	decvax!harpo!seismo!rlgvax!cvl!elsie!ado
DDD:	(301) 496-5688