In the V5 to V6 compiler migration document is the following with respect to optimzations
-O0 No Optimization. Not recommended for use in ARM Compiler 6.6
-O1 Limited Optimization. This is currently the recommended level for source level debugging.
I would like to know why -O0 is not recommended. I find -O1 has optimizations which affect breakpoints and single-stepping through code in a sane manner.
I guess that -O0 is very unoptimized - but if it is suitable for your needs, then there is no issue in using it.