merging cccp and cpplib
Per Bothner
bothner@cygnus.com
Mon Dec 7 16:59:00 GMT 1998
> Warning: this might affect the cpplib interface somewhat, though I don't
> want to make gratuitous changes.
Well, there is no harm changing the cpplib API, at this point, since there are
only three [known] programs (fix-header, cc1, and cppmain) that call it.
I'm fairly sure we *do* want ABI changes. For example, c-lex should not
have to explicitly parse #line commands.
> For some time I've
> planned to start with the cccp code and re-cpplibize it (addressing
> the performance concerns mentioned above), and with this in mind I
> haven't bothered to fix some relatively unimportant bugs in cpplib.
> Hence I think the cccp.c code is the right one to start with.
That doesn't seem like the best approach. Zack Weinberg <zack@rabi.columbia.edu>
has recently been working on making cpplib faster, including various
include file optimizations similar to what you and I did for cccp years ago.
He and Dave have also been working on fixing bugs. I see no particular
advantage of starting of from scratch.
What might make sense (and is perhaps what you meant) is to go over cccp.c
line-by-line and compare it to the equivalent code in cpplib. While somewhat
tedious, it is probably not as bad as going through years of patches, some of
which may have been obsoleted by later changes.
--Per Bothner
Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner
More information about the Gcc-bugs
mailing list