Suspicion of regression in uninitialized value detection

Robert Dewar dewar@adacore.com
Wed Dec 7 19:49:00 GMT 2011


On 12/7/2011 2:36 PM, David Brown wrote:
\
> I guess experiences vary.  As I said, I find debugging easier with -O1 -
> but maybe that's because most of my work is on embedded targets, which
> usually means RISC cpus with plenty of registers.  The unoptimised code
> for these is usually totally incomprehensible, and the target speed is
> several times slower, because of all the extra work done moving data
> onto and off from the stack.

Sure, if you are memory constrained, then -O0 is a big problem, and I
agree that reading -O1 machine code is much easier than reading -O0
code, but if you are just doing source level debugging in an environment
with lots of space and CPU power to spare, -O0 is much more convenient.

The worst thing for me about -O1 is arguments disappearing in the trace
back, that's really a deal breaker.



More information about the Gcc mailing list