aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-ppoutput.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.co.uk>2003-03-14 21:47:50 +0000
committerNeil Booth <neil@gcc.gnu.org>2003-03-14 21:47:50 +0000
commit23345bbbcc8dc9c11168d0fd6b2afb415cb6c4e6 (patch)
treef86d032aa7796736ae3b48b9d527b9b116caa900 /gcc/c-ppoutput.c
parent98d2dec7e3268ca0baee90e2d89da4d75fe4c193 (diff)
downloadgcc-23345bbbcc8dc9c11168d0fd6b2afb415cb6c4e6.zip
gcc-23345bbbcc8dc9c11168d0fd6b2afb415cb6c4e6.tar.gz
gcc-23345bbbcc8dc9c11168d0fd6b2afb415cb6c4e6.tar.bz2
/home/neil/diffs/include.log
From-SVN: r64373
Diffstat (limited to 'gcc/c-ppoutput.c')
-rw-r--r--gcc/c-ppoutput.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c
index 14ae31b..c4e3121 100644
--- a/gcc/c-ppoutput.c
+++ b/gcc/c-ppoutput.c
@@ -58,7 +58,6 @@ static void cb_include PARAMS ((cpp_reader *, unsigned int,
const unsigned char *, const cpp_token *));
static void cb_ident PARAMS ((cpp_reader *, unsigned int,
const cpp_string *));
-static void cb_file_change PARAMS ((cpp_reader *, const struct line_map *));
static void cb_def_pragma PARAMS ((cpp_reader *, unsigned int));
/* Preprocess and output. */
@@ -66,8 +65,6 @@ void
preprocess_file (pfile)
cpp_reader *pfile;
{
- cpp_finish_options (pfile);
-
/* A successful cpp_read_main_file guarantees that we can call
cpp_scan_nooutput or cpp_get_token next. */
if (flag_no_output)
@@ -110,8 +107,6 @@ init_pp_output (out_stream)
cb->ident = cb_ident;
cb->def_pragma = cb_def_pragma;
}
- if (!flag_no_line_commands)
- cb->file_change = cb_file_change;
}
if (flag_dump_includes)
@@ -368,18 +363,20 @@ cb_include (pfile, line, dir, header)
described in MAP. From this point on, the old print.map might be
pointing to freed memory, and so must not be dereferenced. */
-static void
-cb_file_change (pfile, map)
- cpp_reader *pfile;
+void
+pp_file_change (map)
const struct line_map *map;
{
const char *flags = "";
+ if (flag_no_line_commands || flag_no_output)
+ return;
+
/* First time? */
if (print.map == NULL)
{
/* Avoid printing foo.i when the main file is foo.c. */
- if (!CPP_OPTION (pfile, preprocessed))
+ if (!cpp_get_options (parse_in)->preprocessed)
print_line (map, map->from_line, flags);
}
else