(finclude): Increment indepth before calling
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 20 Aug 1992 01:06:05 +0000 (18:06 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 20 Aug 1992 01:06:05 +0000 (18:06 -0700)
trigraph_pcp, so that warning uses the correct file name.

From-SVN: r1901

gcc/cccp.c

index 382e534408e138a229acb74c6cc7fa8d63a75db5..d2debf2012a694b9568d322540c4eeac78099856 100644 (file)
@@ -4084,6 +4084,12 @@ finclude (f, fname, op, system_header_p, dirptr)
   /* Close descriptor now, so nesting does not use lots of descriptors.  */
   close (f);
 
+  /* Must do this before calling trigraph_pcp, so that the correct file name
+     will be printed in warning messages.  */
+
+  indepth++;
+  input_file_stack_tick++;
+
   if (!no_trigraphs)
     trigraph_pcp (fp);
 
@@ -4095,9 +4101,6 @@ finclude (f, fname, op, system_header_p, dirptr)
   }
   fp->buf[fp->length] = '\0';
 
-  indepth++;
-  input_file_stack_tick++;
-
   output_line_command (fp, op, 0, enter_file);
   rescan (op, 0);