This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Suggested replacement for specs and switch handling
On Sun, Jun 24, 2001 at 09:33:45PM +0100, Neil Booth wrote:
> Hi Zack,
>
> Thanks for your analysis.
>
> Zack Weinberg wrote:-
>
> > First, I agree with Joseph that the option table should be broken up
> > by front end. It does no great harm to have an option mentioned in
> > multiple tables - you have to sort it anyway, so you can weed out the
> > duplicates then. It will be more initial work but it will definitely
> > be easier to maintain.
>
> OK, sigh. I was hoping to get something in and refine it later. It
> is more work to work on large bodies of code that are out of CVS; and
> it also means only one person can work on it.
Perhaps a branch is called for?
> > > -D pt a +D
> > > -Wstrict-prototypes COX nB Wstrict_prototypes
> > > -falign-jumps= T j falign_jumps_eq
> > > -std=c99 pCO n std=STD_C99
> > > --shared D nAV -shared
> >
> > cpp,tcpp -D% accumulate D
> > cpp,tcpp "-D %" rewrite -D%
> > c,c++,objc -Wstrict-prototypes boolean Wstrict_prototypes
> > backend -falign-jumps=% - falign_jumps_eq
> > cpp,c,objc -std=c99 - std=STD_C99
> > driver --shared abbrev shared
>
> It's nicer, but makes gen-switches a lot more complex (at present it's
> just a quick hack 8-)). You need to handle optional arguments in your
> scheme (that's how I handle some switches like "-g" at present, with
> an "o" flag). What would you suggest?
-g has an optional argument, but only attached, right? Zack's scheme
could probably have -g and -g%, defining a % to match at least one
character.
> Yes, there are 2 ways to do it. I did some one way, some the other,
> for variety :-)
>
> > help {
> > -Dname Define a macro with value 1
> > -Dname=expansion Define a macro with value EXPANSION
> > ...
> > }
>
> Help in it's own section might be a good idea. If we put texinfo in
> too, we'd need some way to break it into the separate menus under the
> Invocation section, too.
I'd actually like to suggesat something like this:
cpp,tcpp -D% accumulate D
cpp,tcpp "-D %" rewrite -D%
-Dname Define a macro with value 1
-Dname=expansion Define a macro with value EXPANSION
<blank line>
backend -falign-jumps=% - falign_jumps_eq
...
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer