This is the mail archive of the egcs-patches@egcs.cygnus.com mailing list for the EGCS project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH for a rather bad cpplib related bug


On Mon, 05 Jul 1999 11:45:20 -0400, Dave Brolley wrote:
>I don't think finish_parse is a good place for this check. There is alot that 
>gets done after finish_parse is called from compile_file in toplev.c. Also, ea
>ch
>language has it's own finish_parse, so you would need to fix each language tha
>t uses cpplib (C, C++, OBJC). Perhaps this should be checked at the end of 'ma
>in'
>along with the other checks of this nature.

Yeah, I was wondering about that too.  Perhaps something like this would
be more appropriate?  (All the front ends that use cpplib call the reader
structure parse_in.)

I don't think this should be put into the release branch.  --enable-c-cpplib
isn't expected to work in 2.95 anyway.

zw

Index: toplev.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/toplev.c,v
retrieving revision 1.186
diff -u -r1.186 toplev.c
--- toplev.c	1999/05/20 10:37:00	1.186
+++ toplev.c	1999/07/05 16:54:55
@@ -357,6 +357,12 @@
 int warningcount = 0;
 int sorrycount = 0;
 
+/* If cpplib is in use, must check there for errors too.  */
+#if USE_CPPLIB
+#include "cpplib.h"
+extern cpp_reader parse_in;
+#endif
+
 /* Pointer to function to compute the name to use to print a declaration.
    DECL is the declaration in question.
    VERBOSITY determines what information will be printed:
@@ -5462,6 +5468,10 @@
     exit (FATAL_EXIT_CODE);
   if (sorrycount)
     exit (FATAL_EXIT_CODE);
+#if USE_CPPLIB
+  if (parse_in.errors)
+    exit (FATAL_EXIT_CODE);
+#endif
   exit (SUCCESS_EXIT_CODE);
   return 0;
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]