* [PATCH] Avoid regressing with the PR48248 change
@ 2011-04-18 13:38 Richard Guenther
2011-04-21 19:58 ` Joseph S. Myers
0 siblings, 1 reply; 2+ messages in thread
From: Richard Guenther @ 2011-04-18 13:38 UTC (permalink / raw)
To: gcc-patches; +Cc: Joseph S. Myers
This avoids changing -P output with the PR48248 fix which appearantly
breaks Chrome (with has bogus assumptions on gcc -E -P output).
For 4.7 I think we should instead go with the 2nd patch and make -P
output smaller (which is the whole reason for this code path).
Thus, first patch is for the 4.6 and 4.5 branches and the second for
the trunk.
Sofar I bootstrapped and tested the first on the 4.6 branch.
Ok for both variants after testing completed?
Thanks,
Richard.
2011-04-18 Richard Guenther <rguenther@suse.de>
PR preprocessor/48248
* c-ppoutput.c (maybe_print_line): Avoid changing -P behavior.
Index: gcc/c-family/c-ppoutput.c
===================================================================
--- gcc/c-family/c-ppoutput.c (revision 172641)
+++ gcc/c-family/c-ppoutput.c (working copy)
@@ -316,7 +316,7 @@ maybe_print_line (source_location src_lo
if (src_line >= print.src_line
&& src_line < print.src_line + 8
- && strcmp (map->to_file, print.src_file) == 0)
+ && (flag_no_line_commands || strcmp (map->to_file, print.src_file) == 0))
{
while (src_line > print.src_line)
{
2011-04-18 Richard Guenther <rguenther@suse.de>
* c-ppoutput.c (maybe_print_line): Do not preserve up to 7
empty lines with -P.
Index: c-family/c-ppoutput.c
===================================================================
--- c-family/c-ppoutput.c (revision 172644)
+++ c-family/c-ppoutput.c (working copy)
@@ -314,7 +314,8 @@ maybe_print_line (source_location src_lo
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)
{
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Avoid regressing with the PR48248 change
2011-04-18 13:38 [PATCH] Avoid regressing with the PR48248 change Richard Guenther
@ 2011-04-21 19:58 ` Joseph S. Myers
0 siblings, 0 replies; 2+ messages in thread
From: Joseph S. Myers @ 2011-04-21 19:58 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches
On Mon, 18 Apr 2011, Richard Guenther wrote:
> This avoids changing -P output with the PR48248 fix which appearantly
> breaks Chrome (with has bogus assumptions on gcc -E -P output).
>
> For 4.7 I think we should instead go with the 2nd patch and make -P
> output smaller (which is the whole reason for this code path).
>
> Thus, first patch is for the 4.6 and 4.5 branches and the second for
> the trunk.
>
> Sofar I bootstrapped and tested the first on the 4.6 branch.
>
> Ok for both variants after testing completed?
OK.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-21 19:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 13:38 [PATCH] Avoid regressing with the PR48248 change Richard Guenther
2011-04-21 19:58 ` Joseph S. Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).