condition convention 'if (10 == j)...'

Bjarne Stroustrup bs at alice.UUCP
Wed May 1 23:44:38 AEST 1985


It is silly to warp ones programs to overcome language and/or compiler
deficiencies (though sometimes necessary). As mentioned before on the net,
it is however trivial for a C compiler to detect most occurrences of the
	if (j = 10)
bug. For example, on seeing that the C++ compiler issues this:
	"warning: constant assignment in condition"



More information about the Comp.lang.c mailing list