aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmain.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2002-11-08 20:15:05 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-11-08 20:15:05 +0000
commite6e8c77230468e239ece1a0254781b9392fca797 (patch)
tree7ced8c4b49f8690bf788ef65eacd2b9e2a2978df /gcc/cppmain.c
parentffdf5eae7f85e5a4cb862709d5939f57c18054a3 (diff)
downloadgcc-e6e8c77230468e239ece1a0254781b9392fca797.zip
gcc-e6e8c77230468e239ece1a0254781b9392fca797.tar.gz
gcc-e6e8c77230468e239ece1a0254781b9392fca797.tar.bz2
cppmain.c (cpp_preprocess_file): Loop to pop any -included buffers.
* cppmain.c (cpp_preprocess_file): Loop to pop any -included buffers. From-SVN: r58933
Diffstat (limited to 'gcc/cppmain.c')
-rw-r--r--gcc/cppmain.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cppmain.c b/gcc/cppmain.c
index 4036bc3..9d8d42c 100644
--- a/gcc/cppmain.c
+++ b/gcc/cppmain.c
@@ -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