C question

VLD/VMB gwyn at Brl-Vld.ARPA
Fri Apr 12 16:08:04 AEST 1985


At least for
	i == j;
lint issues a "null effect" message, since this is a meaningless
thing for the programmer to be doing.  Unfortunately
	if ( i = j )
is a menaingful construct that is actually widely used.  I
personally would have written
	if ( (i = j) != 0 )
but not everyone is careful to avoid the shortcuts built into C.
A "boolean" data type would have been very useful for detecting
such errors but C hasn't any, alas.



More information about the Comp.lang.c mailing list