This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Move cpp options handling to front ends?
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 25 Jul 2002 15:20:59 -0700
- Subject: Re: Move cpp options handling to front ends?
- References: <20020725215143.GA12245@daikokuya.co.uk>
On Thu, Jul 25, 2002 at 10:51:43PM +0100, Neil Booth wrote:
> I imagine cpplib is about the only library that does its own
> option parsing. I don't think this is ideal.
>
> Would it be a good idea to move cpplib's option parser to
> the C front ends, combining it with the (currently separate)
> C and C++ parsers at the same time to become one big parser?
>
> We can do this now that CPP is totally integrated, and if we
> used CPP's table-scan method it would be a small performance
> win to boot, since it uses a binary search whereas C and C++
> do an almost linear scan.
>
> fix-header might need a tweak, but I'm not sure what if any
> command line arguments it wants to use.
This seems like a good move, except for one thing: when we finally get
cpplib shifted to its own directory, I want that dir to provide a
'makedepend' program which we can then use to generate dependencies
for the build over in the gcc directory. This program will probably
need to understand at least -I and -D switches.
zw