diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e842227b3260..c02569ed92ee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-06-01 Per Bothner + + Suppress extra '#1 or '#1 ' on -dD output. + * c-opts.c (finish_options): Use internal line 0 for . + * c-ppoutput.c (cb_define): Don't increment line 0. + 2006-06-01 Pete Steinmetz * doc/invoke.texi: Add cpu_type power6. diff --git a/gcc/c-opts.c b/gcc/c-opts.c index ea631b0530af..2937b7995cd8 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1373,7 +1373,10 @@ finish_options (void) their acceptance on the -std= setting. */ cpp_opts->warn_dollars = (cpp_opts->pedantic && !cpp_opts->c99); - cpp_change_file (parse_in, LC_RENAME, _("")); + cb_file_change (parse_in, + linemap_add (&line_table, LC_RENAME, 0, + _(""), 0)); + for (i = 0; i < deferred_count; i++) { struct deferred_opt *opt = &deferred_opts[i]; diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c index 2c4640cc460b..10540b7f1251 100644 --- a/gcc/c-ppoutput.c +++ b/gcc/c-ppoutput.c @@ -324,7 +324,8 @@ cb_define (cpp_reader *pfile, source_location line, cpp_hashnode *node) fputs ((const char *) NODE_NAME (node), print.outf); putc ('\n', print.outf); - print.src_line++; + if (linemap_lookup (&line_table, line)->to_line != 0) + print.src_line++; } static void