|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
In my source code, some expressions that use optimized variables in registers don't execute the desired code when using Optimization level 8 and 9. For example:
. . . unsigned char new_string; // new_string was placed in R7 unsigned char count = 0; // count was placed in R6 . . . new_string[count++] = 'A'; . . .
The compiler copies the desired character, but it does not increment the count array index.
This is caused by a problem with register optimization in C51 V6.22.
This problem is resolved in C51 V6.23. You may download the latest updates from the Keil Website.
Request the files attached to this knowledgebase article.
Article last edited on: 2002-05-07 00:00:00
Did you find this article helpful? Yes No
How can we improve this article?