build regression

Neil Booth neil@daikokuya.co.uk
Mon Jun 16 19:09:00 GMT 2003


Alexandre Oliva wrote:-

> Am I the only one who finds this...  erhm...  disgusting? :-)  :-(
> (no offense intended upon the author of the patch, mind you :-)
> 
> I mean...  If we (ok, you :-) are revamping the command-line option
> handling, wouldn't we be better off with a system that doesn't require
> all languages (even those outside our tree) to agree on whether an
> option takes arguments or not?  I agree this would make the main code
> more complex and perhaps harder to maintain, but do we really want to
> make it simpler at the (potential and, in this case, actual) expense
> of the maintainability of language front ends?

I disagree.  You might have a point if there were, say, one or two
dozen switches where this was the case.  However, it appears that
there are just these two, and the difference is not even user-visible.
It's not a maintenance problem either.

I'm trying to simplify things.  Like most things with GCC, option
handling is unnecessarily complex; I believe simplicity is a virtue.
Allowing front ends to specify options that are different in bahaviour
to other front ends is, IMO, a bad idea.  It's not like we're short of
names for switches, or there is a good reason to do so.

However, what I like least about your proposal is that it would prevent
me from achieving what is probably the main goal of my option rewrite.
I want to be able to *decode* all switches before *handling* any of them,
and to do this switch decoding has to be language and target independent
(its being so is good design to me at least).  The fact that we can't do
this at present is the cause of numerous kludges like tri-state variables
and the prescan for -O switches in toplev.c.

> Maybe it's time to step back and re-engineer the command-line handling
> code such that it can accommodate diverse needs of front ends like
> this, instead of forcing them to eventually start using separate
> option name spaces, to avoid stepping onto each other's toes.

I have re-engineered it - and I like the way it's evolving.  I hope
you will agree once I've finished 8-)

Neil.



More information about the Gcc-patches mailing list