Need some opinions

Joe Buck jbuck@Synopsys.COM
Wed Mar 31 23:46:00 GMT 1999


On Mon, Mar 08, 1999 at 09:50:17PM -0000, craig@jcb-sc.com wrote:
> > I'm not sure whether we really need a `-Onil' ("absolutely nothing")
> > option anyway.

Richard H writes:

> I don't think we do.  Sure there's some minimal chance of a bug in some
> optimization.  But we already don't do _no_ optimizations -- constant
> folding being a prime example.  It's no worse than having a typo in an
> assembly output template.

I don't see any reason for change.  What users generally want, when they
don't specify optimization, is:

1. Fast compilation (compile/link/debug cycle is the bottleneck).

2. Simple debugging (step through the code statement-by-statement and
   there are no surprises).

3. No bugs.  (Well, we can dream ...)

Extra flags are the enemy of #3 (it's less likely that all combinations
will be tested, thus more likely that a "brown paper bag bug" will show up
for some combination of flags if we add a lot of new ones).  Constant
folding can actually speed up compilation (less data to go through the
rest of the compiler) and doesn't interfere with simple debugging.

Tons of people run the compiler with -g and no optimization flags, and
we will quickly hear about any problems.  The idea that we should make
changes to decrease risk seems backwards to me.

It isn't broken, so we don't need to fix anything.  cpplib integration
might help with #1 -- lex only once.  Otherwise, there are more important
problems.






More information about the Gcc mailing list