OSDN Git Service

1998-05-26 Dave Brolley <brolley@cygnus.com>
authorbrolley <brolley@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 May 1998 10:47:58 +0000 (10:47 +0000)
committerbrolley <brolley@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 May 1998 10:47:58 +0000 (10:47 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20059 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/Makefile.in
gcc/cp/lex.c

index c04f9c8..b3c572c 100644 (file)
@@ -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.
index e4ebf24..8d816b0 100644 (file)
@@ -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
index 07109e4..0cc98af 100644 (file)
@@ -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, "-"))
     {