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.
Hi, there is huge misunderstood in C166, just try this: #pragma code // and char * cptr; // and this: cptr[-1]=*cptr++; and look at the assmbled machine code. and ... have a lot of fun ...
To see what really is going on, I would suggest to have a look at the following piece of code:
void main(void) { char xhuge* cptr = (char xhuge*)*(long*)0; // just to see what registers are allocated for cptr cptr[-1]=*cptr++; }
Thank you. I have forgotten to say about default memory model - sorry for your inconvenience. Let suppose that you are porting some source code which works fine under gcc. Should C166 generate some warning ? What do you think about it ? (line : "*cptr++=cptr[1];" will produce correct code) Best regards