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 Thu, Nov 23, 2000 at 10:13:25PM -0500, Phil Edwards wrote:
> 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.

Another way of getting the same information -- compile with -fverbose-asm
and -save-temps (assuming asm comment characters are defined), and look at the
asm temp file.

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

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