Code performance is not considered observable behavior and could potentially be changed by the compiler in any direction. From a practical point of view, for reasons of implementation quality (QoI), compilers do not degrade your programs, but there are times when QoI does not work.
The compiler, taking into account the corresponding flags, could add the toolkit to the program that it creates for debugging purposes (this often happens in library implementations, for example, with proven iterators).
Please note that the simple answer to when the compiler will degrade your program is twofold: when the client requests it or when the developer does not want to have users for the compiler.
David Rodríguez - dribeas Oct 07 '14 at 7:52 2014-10-07 07:52
source share