From 276ca6eaf8623ff4cda3416018f5885968791eb7 Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Tue, 26 May 1998 10:47:58 +0000 Subject: lex.c (parse_options,yy_cur,yy_lim): Add for cpplib. 1998-05-26 Dave Brolley * 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 --- gcc/cp/ChangeLog | 8 ++++++++ gcc/cp/Makefile.in | 4 ++-- gcc/cp/lex.c | 17 +++++++++++++++-- 3 files changed, 25 insertions(+), 4 deletions(-) (limited to 'gcc') 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 + + * 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 * 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, "-")) { -- cgit v1.1