gcc

gcc optimization: what does -O0 do?


According to the gcc online documentation, it

Reduce compilation time and make debugging produce the expected results. 
This is the default.  

So is it the same as leaving out -O flag at all or not?


Solution

  • According to GCC documentation, yes, -O0 is the default. So it is the same as leaving out the flag completely.