* cppmain.c (cpp_preprocess_file): Loop to pop any -included
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Nov 2002 20:15:05 +0000 (20:15 +0000)
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Nov 2002 20:15:05 +0000 (20:15 +0000)
buffers.

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

gcc/ChangeLog
gcc/cppmain.c

index dda45b2..b473c78 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-08  Neil Booth  <neil@daikokuya.co.uk>
+
+       * cppmain.c (cpp_preprocess_file): Loop to pop any -included
+       buffers.
+
 2002-11-08  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.md (two anonymous test insns): New.
index 4036bc3..9d8d42c 100644 (file)
@@ -78,7 +78,12 @@ cpp_preprocess_file (pfile, in_fname, out_stream)
       /* A successful cpp_read_main_file guarantees that we can call
         cpp_scan_nooutput or cpp_get_token next.  */
       if (options->no_output)
-       cpp_scan_nooutput (pfile);
+       {
+         /* Scan -included buffers, then the main file.  */
+         while (pfile->buffer->prev)
+           cpp_scan_nooutput (pfile);
+         cpp_scan_nooutput (pfile);
+       }
       else if (options->traditional)
        scan_translation_unit_trad (pfile);
       else