Keil Logo

C51: PROBLEMS WITH LONG COMPARISONS TO 0 IN V6.21


Information in this article applies to:

  • C51 Version 6.21

SYMPTOMS

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:

CAUSE

This problem is caused by a problem in the optimizer in C51 V6.21. This problem is corrected in C51 V6.22.

RESOLUTION

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.

STATUS

This problem is resolved in C51 V6.22.

Last Reviewed: Monday, December 31, 2001


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.