[net.unix-wizards] Caveat Hackers

gwyn@utexas-11@sri-unix (06/11/82)

From: Douglas A Gwyn <gwyn@utexas-11>
Date: 30 May 1982 at 2239-CDT
I agree with the statement that uncontrolled conversions are to be avoided.
The main use of
	var op= expr ;
is supposed to be when var is tedious to write twice (such as subscripted
array, m.o.s., etc.).  Obviously the PCC decided that
	int_var op= flt_expr ;
was to be interpreted as
	int_var = int_var op (int)flt_expr ;
instead of
	int_var = (int) ((float)int_var op flt_expr) ;
which is fine with me, since the latter interpretation is far from being
a "natural" use of the language.  If that is what was wanted, it should
have been written that way to make the coercions visible.

I agree that the compiler's behavior is a bug, by the way.
-------