We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
In ASM51, the following code is every useful:
-------- file1.asm --------- public MAX MAX EQU 10 -------- file2.asm --------- extrn number(MAX) MOV A,#MAX
-------- file2.C ----------- extern code MAX; #define MAX_NUMBER ((unsigned char)&MAX)
You don't give any real explanation why the differences in behaviour of the code for these two particular functions would constitute an optimizer defect. C51 functions aren't reentrant unless you ask for them to be. That has nothing to do with the subject of this thread.