In the end the compiler will have to use runtime routines for certain C constructs.
For this particular case, optimizing for time (-ot) causes that the compiler inlines the runtime support function.
In general, with -ot the compiler does inline as much as he supports. There is a message which can be used so that the code wont compile if it contains a runtime call.
Use a
>#pragma MESSAGE ERROR C3605 // Runtime object _ILSR is used at PC 0x30
before the code starts and a
>#pragma MESSAGE DISABLE C3605
after the code which must not use runtime calls.
Daniel
Code:
// Configure C3605: Runtime object _ILSR is used at PC 0x30// as error.#pragma MESSAGE ERROR C3605 unsigned short page, res;void func(){ // Only compiles with -ot res = (page & 0x07FF) >> 7;}