From 304dfbe3647ba3ef75f952913447ba3a5d5c5f29 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 26 Apr 2011 10:14:34 +0000 Subject: [PATCH] re PR preprocessor/48248 (Wrong error message location when compiling preprocessed code) 2011-04-26 Richard Guenther PR preprocessor/48248 * c-ppoutput.c (maybe_print_line): Always optimize newlines for output size with -P. From-SVN: r172959 --- gcc/c-family/ChangeLog | 6 ++++++ gcc/c-family/c-ppoutput.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index b0f27c510d4..6c6ca988957 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2011-04-26 Richard Guenther + + PR preprocessor/48248 + * c-ppoutput.c (maybe_print_line): Always optimize newlines + for output size with -P. + 2011-04-20 Jim Meyering * c-format.c (init_dollar_format_checking): Remove useless diff --git a/gcc/c-family/c-ppoutput.c b/gcc/c-family/c-ppoutput.c index 9ebac423164..16d4f7de994 100644 --- a/gcc/c-family/c-ppoutput.c +++ b/gcc/c-family/c-ppoutput.c @@ -314,7 +314,8 @@ maybe_print_line (source_location src_loc) print.printed = 0; } - if (src_line >= print.src_line + if (!flag_no_line_commands + && src_line >= print.src_line && src_line < print.src_line + 8 && strcmp (map->to_file, print.src_file) == 0) { -- 2.30.2