ARM Technical Support Knowledge Articles


Applies to: C251 C Compiler



C251 Version 2.12f generates incorrect code for the following example program:

void main (void)
    unsigned short near Number;

    Number = 1;
    ChangeLocal (&Number);

Specifically, the Number++ statement changes Number to 2 instead of incrementing it. Is there a fix for this problem?


Yes. There is a correction for this problem.

In early versions of C251 Version 2, optimizations involving pointer aliases were too aggressive and optimized necessary code out of the program. This has been corrected in C251 Version 2.14b. Contact our technical support staff to receive the updated C251 compiler via e-mail.

Article last edited on: 2004-05-24 20:35:32

Rate this article

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