C51: PROBLEMS WITH LONG COMPARISONS TO 0 IN V6.21
Information in this article applies to:
Long integer comparisons to 0 (zero) in C51 V6.21 sometimes evaluate incorrectly. For example, expressions like:
long long_var; . . . if (long_var > 0) . . .
fail to evaluate correctly when long_var is greater than 0. Expressions like:
This problem is caused by a problem in the optimizer in C51 V6.21. This problem is corrected in C51 V6.22.
As a workaround, you may use the following:
long long_var; . . . if (long_var >= 1) . . .
You may download the latest update which corrected this problem from the Keil Website.
This problem is resolved in C51 V6.22.
Last Reviewed: Monday, December 31, 2001
of your data.