In my code I have many of constants have same value. I cannot use same name of constant due to logic.
On optimization will keil take different memory of each or same memory.
I am using three setting of optimization: 1. O0 2. Cross + microlib + O2 3. Cross + Time + O3
Just note that 'const' means different things in C or C++.
In C++, the language allows it to be used as size of arrays etc. So really full constant folding optimizations all out with better compilers.