This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Criteria for a warning to be in -Wall? (was: Re: a warning to implement)
- From: Joe Buck <jbuck at synopsys dot COM>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: galibert at pobox dot com, gcc at gcc dot gnu dot org
- Date: Wed, 6 Feb 2002 23:00:57 -0800 (PST)
- Subject: Re: Criteria for a warning to be in -Wall? (was: Re: a warning to implement)
> <<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.