This is the mail archive of the
mailing list for the GCC project.
Re: [RFA/C] Break out C options into a separate file
Geoff Keating wrote:-
> I have some suggestions:
> 1. Please please put the '--help' output in the file with the options, if
> at all possible. (In fact, it'd be pretty cool if the documentation could
> go there too, because that way adding an extra option would require
> changing only one place.)
This is the plan for future patches. I'd like to get the texinfo in
too, but that's harder.
The ultimate plan is:
1) To have g77.opt, gcj.opt etc.
2) To have toplev.opt for the common options (if you have a better
3) To have config/cpu/cpu.opt for the back ends.
4) To pass them all to a single invocation of opts.sh (it accepts
multiple files on the command line).
5) To have toplev.c (or more likely a new file) do what c-opts.c
does now, and hand language- or target- specific options to
the front end or back end through hooks, and handle toplev
opts via a separate function, much like toplev.c does now.
This should allow there to be a single loop over the options,
apart from a preliminary pass that collects some stats, and maybe
discovers the -O switches like there is now.
This has bootstrapped x86 NetBSD C, ObjC and C++ without regressions,
OK to commit?