Criteria for a warning to be in -Wall? (was: Re: a warning to implement)

Joe Buck jbuck@synopsys.COM
Wed Feb 6 23:20:00 GMT 2002


> <<I'd love a "perfect debugging as with -g only but with flow analysis
> for uninitialized warnings" option, but it's probably not easy to add.
> >>
> 
> What I really want is "perfect debugging with as much optimization as is
> possible without compromising debugging information. One of the problems
> with gcc for me is that the -O0 mode is really awful (we actually run into
> trouble with customers who insist on benchmarking unoptimized code and gcc
> is worse than any other compiler around in this mode -- yes yes we know
> about telling people that this is a good thing, that gcc really obeys
> you when you say no optimziation, but the fact is that the code is 
> unnceessarily (from a debugging point of view) awful in -O0 mode.

It seems to me that if we had an optimization level (call it -O0.5, or
just adjust -O1) in which, at the end of each line, values get flushed
back to memory, we'd pretty much have it: complicated expressions inside
one line of code could be optimized as much as you want, but the 
developer in the debugger would see just what he wrote.  



More information about the Gcc mailing list