This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: thoughts on a new switch, -print-flags ?


On Wed, Nov 22, 2000 at 11:35:52PM +0000, Neil Booth wrote:
> Phil Edwards wrote:-
> 
> > The print_switch_values() function in toplev.c is doing the real work so
> > far; I'd thought about creating sorted output instead, but that sounds like
> > overkill.  The only deficiency in this function is that the lang-specific
> > flags aren't looked at.  I have some thoughts on how to do that, but wanted
> > to hear any thoughts first.
> 
> I don't think you should sort anything - order matters for many of the
> options.

I'm not talking about sorting the input; just the output.  E.g., instead of

    -ffoo -fbar -fquux -fbaz

being printed, we'd see

    -fbar -fbaz -ffoo -fquux

just to make it slightly easier for people who are visually grepping for
a particular option to see whether it's there or not.  The scanning of
options, and overriding previous ones, hasn't changed and isn't touched;
everything is determined well before the printing routine picks up.

(Or are you worried that people would see the output and become confused?
I can understand that, too.)

That was all before I found that code was already written to do a lot of
the work; I didn't want to reinvent the wheel just to add prettier spokes.


Phil

-- 
pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools.  Fools are protected by more capable fools.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]