commandline help

Jeffrey A Law law@cygnus.com
Sun Feb 15 11:33:00 GMT 1998


  In message < 19980214113902.17693@cerebro.laendle >you write:
  > On Fri, Feb 13, 1998 at 01:12:12AM -0700, Jeffrey A Law wrote:
  > > 
  > >   In message < 19980213035220.52024@cerebro.laendle >you write:
  > >   > 
  > >   > bad: gcc -? doesn't give reasonable output.
  > > I don't think we want a -? option.  I would recommend we stick with --hel
  > p
  > > as that's the GNU standard option for command line help.
  > 
  > look more closely... -? isn't a supported switch even WITH the patch...
I haven't seen the patch, so I can't actually check -?.  I was
giving my recommendation.

  > I should have used
  > 
  > gcc -mno-avail
  > 
  > or
  > 
  > gcc
  > 
  > to illustrate the example... with the patch, -? is diagnosed
  > (as usual) as an unknown switch, and a small help message is printed.
Ah, yes, if an unknown switch is given, the compiler should do something
like spit out "uknown option: use gcc -help to print available options"

  > >   > it can be enabled with configure --enable-clh.. the patch needs some
  > >   > tuning, but it was tested in pgcc for some time..
  > > I woudn't bother making it a configure option -- always include it.
  > 
  > it makes gcc some 70kb larger (if not more).
We can live with that.

  > actually, the texi files for gcc, g++ and g77 are parsed with a shell
  > script, so there is no maintainance problem...
They're not easily parsed, then added to C code.  It can be done,
but it would take some work.  I mentioned it as an issue that we
will want to resolve in some way or another.

If we walk down f_options and the machine dependent options, then
we at least know all the switches, even if we don't have
descriptions for them.

jeff



More information about the Gcc mailing list