Vax C compiler inconsistency

utzoo!utcsrgv!thomson utzoo!utcsrgv!thomson
Tue May 17 17:01:57 AEST 1983


The 4.1bsd C compiler, when fed
	int a;
	a = (short)a;
quite reasonably generates
	cvtwl	_a,r0
	movl	r0,a
to faithfully follow the programmer's intent of shortening then
lengthening a.  But if you give it
	double a;
	a = (float)a;
you end up with
	movd	_a,_a



More information about the Comp.bugs.4bsd.ucb-fixes mailing list