tradcpp.c (main): Make sure finclude() is called with a valid indepth value while...
authorFranz Sirl <Franz.Sirl-kernel@lauterbach.com>
Wed, 3 Jan 2001 22:26:05 +0000 (22:26 +0000)
committerFranz Sirl <sirl@gcc.gnu.org>
Wed, 3 Jan 2001 22:26:05 +0000 (22:26 +0000)
2001-01-03  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

* tradcpp.c (main): Make sure finclude() is called with a valid
indepth value while handling -include.

From-SVN: r38674

gcc/ChangeLog
gcc/tradcpp.c

index 7c91711fa5861e831a606c99cc73fd3981ab56f0..3446f71d429197e3f2ca0db69e7c1fdc207a04de 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-03  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
+
+       * tradcpp.c (main): Make sure finclude() is called with a valid
+       indepth value while handling -include.
+
 2001-01-03  Alexandre Oliva  <aoliva@redhat.com>
 
        * gencodes.c (output_predicate_decls): New function.
index bb9724915d96c2167bc5bc972043a9c04e773635..206541c63000a806b627f75f7f23fb7b631616cb 100644 (file)
@@ -1,5 +1,5 @@
 /* C Compatible Compiler Preprocessor (CCCP)
-Copyright (C) 1986, 1987, 1989, 2000 Free Software Foundation, Inc.
+Copyright (C) 1986, 1987, 1989, 2000, 2001 Free Software Foundation, Inc.
                     Written by Paul Rubin, June 1986
                    Adapted to ANSI C, Richard Stallman, Jan 1987
                    Dusted off, polished, and adapted for use as traditional
@@ -768,6 +768,7 @@ main (argc, argv)
      so that only their macro definitions matter.  */
 
   no_output++;
+  indepth++;
   for (i = 1; i < argc; i++)
     if (pend[i].type == PD_FILE)
       {
@@ -779,6 +780,7 @@ main (argc, argv)
          }
        finclude (fd, pend[i].arg, &outbuf);
       }
+  indepth--;
   no_output--;
 
   /* Pending directives no longer needed.  */