OPTIMIZATIONS
Compilation Unit
-OnCstVar
None
None
None
None
This option allows you to switch OFF the replacement of CONST variable by the constant value.
const int MyConst = 5;
int i;
void myfun(void) {
i = MyConst;
}
Without the -OnStVar option, the compiler replaces each occurrence of MyConst with its constant value 5; that is, i = MyConst becomes i = 5;. The Compiler optimizes the Memory or ROM needed for the MyConst constant variable as well. Setting the -OnCstVar option avoids this optimization. Use this option only if you want unoptimized code.