[EMAIL PROTECTED] (Mark Mitchell)  wrote on 01.04.05 in <[EMAIL PROTECTED]>:

> In fact, I've long said that GCC had too many knobs.
>
> (For example, I just had a discussion with a customer where I explained
> that the various optimization passes, while theoretically orthogonal,
> are not entirely orthogonal in practice, and that truning on another
> pass (GCSE, in this caes) avoided other bugs.  For that reason, I'm not
> actually convinced that all the -f options for turning on and off passes
> are useful for end-users, although they are clearly useful for debugging
> the compiler itself.  I think we might have more satisfied users if we
> simply had -Os, -O0, ..., -O3.  However, many people in the GCC
> community itself, and in certain other vocal areas of the user base, do
> not agree.)

Well, yes and no - I sometimes think that gcc doesn't have *enough* knobs.

But, really, not all knobs are equal.

There are classes of knobs that implement a certain kind of control (for  
example, the -Wxxx flags).

There are too many knobs in the sense that, for historical reasons, these  
seemingly-similar knobs often work in subtly different ways.

And there are not enough knobs in the sense that these knobs do not cover  
the whole spectrum that one would want covered - again, mostly for  
historical reasons.

Regularization would be a way to get at both problems at the same time. A  
simple regular class of knobs can be handled much better by actual people  
than a somewhat smaller, irregular one - there are fewer rules to  
remember.

To stay with the warning options example, some options are parts of others  
in nonobvious ways; some rather different warnings are only controlled by  
one option; some warnings have no option to control them. It's *this*  
complexity that is the real problem here, I believe.

If every warning was accompanied by some (presumably not translated) tag,  
and there was an option to enable or disable all warnings with that tag,  
for all tags, that would be much easier to handle, *and* would cover more  
functionality at the same place. *And* you could actually try to do a  
complete warning catalogue for the docs, sorted by tag, and it would still  
work if the warnings themselves were translated and the docs (a much  
bigger job) weren't. Oh, and you'd have more success googling for that  
warning, too.

MfG Kai

Reply via email to