Keil Logo

C251: POINTER ALIAS PROBLEMS

QUESTION

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

void main (void)
    {
    unsigned short near Number;

    Number = 1;
    ChangeLocal (&Number);
    Number++;
    }

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

ANSWER

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.

Last Reviewed: Monday, May 24, 2004


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.