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?
According to GCC documentation, yes, -O0
is the default. So it is the same as leaving out the flag completely.