The -O[level] flag indicates the optimisation level of the compiled program. A level of 1 gives the least optimisation, whereas a level of 3 (some compilers go higher) gives the most optimisation.
NOTES:
This would ensure that the compiler did not introduce errors by re-arranging the code.
On some systems -O is equivalent to -O1; on others, it is equivalent to -O2. Check the local compiler man page.