From: Neil Booth Date: Fri, 8 Nov 2002 20:15:05 +0000 (+0000) Subject: cppmain.c (cpp_preprocess_file): Loop to pop any -included buffers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e6e8c77230468e239ece1a0254781b9392fca797;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dda45b26f9e..b473c789acb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-11-08 Neil Booth + + * cppmain.c (cpp_preprocess_file): Loop to pop any -included + buffers. + 2002-11-08 Kazu Hirata * config/h8300/h8300.md (two anonymous test insns): New. diff --git a/gcc/cppmain.c b/gcc/cppmain.c index 4036bc3b537..9d8d42c2009 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