From: "Graham Davies" <[EMAIL PROTECTED]>
Bob Paddock wrote:
[...]
I don't see while(true){} being any different than for(;;){}
in this context, and while(true){} causes the Lint error
of "evaluation of constant value boolean".
[...]
I can't see why Lint would consider this an error and for ( ; ; ) not.
Even so, isn't there some markup you can add in a comment to reassure Lint
that this is what you intend?
FWIW, assuming you're discussing PC-lint...
PC-lint considers "for (;;)" to be the "traditional" or "conventional" way
to express an endless loop, and therefore does not comment on it.
Personally, I use "while (1)" or "while(TRUE)" more often, and indeed,
PC-lint warns about that, perhaps to catch mistakes of the form of "while
(Flag)" where Flag is a preprocessor macro that expands into a constant. To
suppress that warning for your entire program, use -e716, or disable on the
line you use it with a lint comment like /*lint !e716 */.
Regards,
-=Dave
_________________________________________________________________
With tax season right around the corner, make sure to follow these few
simple tips.
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMFebtagline
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list