ARM Technical Support Knowledge Articles

PROBLEMS WITH LONG COMPARISONS TO 0 IN V6.21

Applies to: C51 C Compiler

Answer


Information in this article applies to:


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.

ATTACHED FILES

Request the files attached to this knowledgebase article.

Article last edited on: 2001-12-31 00:00:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential