diff options
author | Dave Brolley <brolley@cygnus.com> | 1998-05-26 10:47:58 +0000 |
---|---|---|
committer | Dave Brolley <brolley@gcc.gnu.org> | 1998-05-26 06:47:58 -0400 |
commit | 276ca6eaf8623ff4cda3416018f5885968791eb7 (patch) | |
tree | 0a88c48e4e79bad8cfe8ca2dd008aa15fe936a9d /gcc | |
parent | ad076f4e6d18d6c69f538f064c852ab043523204 (diff) | |
download | gcc-276ca6eaf8623ff4cda3416018f5885968791eb7.zip gcc-276ca6eaf8623ff4cda3416018f5885968791eb7.tar.gz gcc-276ca6eaf8623ff4cda3416018f5885968791eb7.tar.bz2 |
lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
1998-05-26 Dave Brolley <brolley@cygnus.com>
* lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
(init_parse): Initialize cpplib interface.
* Makefile.in (CXX_OBJS): Make sure dependencies nenver end with an
empty continuation.
From-SVN: r20059
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/Makefile.in | 4 | ||||
-rw-r--r-- | gcc/cp/lex.c | 17 |
3 files changed, 25 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c04f9c8..b3c572c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +1998-05-26 Dave Brolley <brolley@cygnus.com> + + * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib. + (init_parse): Initialize cpplib interface. + + * Makefile.in (CXX_OBJS): Make sure dependencies nenver end with an + empty continuation. + 1998-05-26 Mark Mitchell <mark@markmitchell.com> * decl.c (pushtag): Avoid crashing on erroneous input. diff --git a/gcc/cp/Makefile.in b/gcc/cp/Makefile.in index e4ebf24e..8d816b0 100644 --- a/gcc/cp/Makefile.in +++ b/gcc/cp/Makefile.in @@ -176,8 +176,8 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config CXX_OBJS = call.o decl.o errfn.o expr.o pt.o sig.o typeck2.o \ class.o decl2.o error.o lex.o parse.o ptree.o rtti.o spew.o typeck.o cvt.o \ - except.o friend.o init.o method.o search.o semantics.o tree.o xref.o repo.o \ - @extra_cxx_objs@ + except.o friend.o init.o method.o search.o semantics.o tree.o xref.o \ + repo.o @extra_cxx_objs@ # Language-independent object files. OBJS = `cat ../stamp-objlist` ../c-common.o ../c-pragma.o diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 07109e4..0cc98af 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -114,7 +114,9 @@ char *inline_text_firstobj; #if USE_CPPLIB #include "cpplib.h" -extern cpp_reader parse_in; +extern cpp_reader parse_in; +extern cpp_options parse_options; +extern unsigned char *yy_cur, *yy_lim; #else FILE *finput; #endif @@ -471,7 +473,18 @@ init_parse (filename) int i; -#if !USE_CPPLIB +#if USE_CPPLIB + yy_cur = ""; + yy_lim = yy_cur; + + cpp_reader_init (&parse_in); + parse_in.data = &parse_options; + cpp_options_init (&parse_options); + cpp_handle_options (&parse_in, 0, NULL); /* FIXME */ + parse_in.show_column = 1; + if (! cpp_start_read (&parse_in, filename)) + abort (); +#else /* Open input file. */ if (filename == 0 || !strcmp (filename, "-")) { |