A simple non-portable expression tha

gwyn at BRL.ARPA gwyn at BRL.ARPA
Thu Apr 24 05:22:54 AEST 1986


The reason "lint" doesn't warn about possible overflow on
	INT + INT + LONG
is that ANY addition/subtraction can potentially overflow.
"lint" warns when a (long) is being converted implicitly
to a shorter integral type, because this is often a source
of inadvertent bugs.  But if it were to warn about every
addition, people would stop using "lint".



More information about the Comp.lang.c mailing list