Proposed toplev/parser protocol change

Per Bothner bothner@cygnus.com
Wed Jan 14 04:17:00 GMT 1998


Please look at the changes marked if #if USE_CPPLIB in toplev.c.
You will see a new interface for initializing the lexer/paser,
and opening the input file.  Basically, the change is to make the
front-end be responsible for opening the input file, and removing
the finput global variable from the common code.  This is more
flexible, and is desirable for most languages (C/ObjC/C++ so the
front-end can use cpplib;  Java so the front-end can open a binary
.class file in binary mode;  Chill so the front-end can get the
real name of the actual input file).

I would like to change toplev.c so those changes are standard,
and remove the old interface.  I am not proposing to actually
make use of cpplib the default for C/C++ - only this specific
change in the interface between toplev.c and the parsers.
Note that this requires changing every front-end to match the
next interface.

It would help if a f77 hacker could make the appropriate patch
for Fortran, but I can probably figure it out myself.

Any reason this would be a bad time to make this change?

	--Per Bothner
Cygnus Solutions     bothner@cygnus.com     http://www.cygnus.com/~bothner



More information about the Gcc mailing list