LINT won't do your debugging for you

Usenet file owner usenet at cps3xx.UUCP
Fri Jun 30 01:07:51 AEST 1989


in article <713 at srhqla.SR.COM>, tcm at srhqla.SR.COM (Tim Meighan) says:
> 
> 1. There is rarely, if ever, a case when it would be reasonable for a
>    program to contain an if() statement that, when evaluated as true,
>    does absolutely nothing.  (In other words, simply fall through to
>    the code to be executed when the if() is false.)

When implementing some very low level code in C under MSDOS, an if
with a null body provides a very handy slight delay. Example: after
sending the address to the CMOS RAM on an AT, you need a slight pause on
a fast machine to then read or write its contents.

Unfortunately, alot of compilers optimize it out.

John H. Lawitzke           UUCP: Work: ...uunet!frith!dale1!jhl
Dale Computer Corp., R&D         Home  ...uunet!frith!ipecac!jhl
2367 Science Parkway       Internet:   jhl at frith.egr.msu.edu
Okemos, MI, 48864                             [35.8.8.108]



More information about the Comp.lang.c mailing list