From patchwork Mon Apr 18 13:22:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 91738 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8F852B6FA0 for ; Mon, 18 Apr 2011 23:22:47 +1000 (EST) Received: (qmail 14997 invoked by alias); 18 Apr 2011 13:22:46 -0000 Received: (qmail 14989 invoked by uid 22791); 18 Apr 2011 13:22:45 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Apr 2011 13:22:12 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id C7EE693717; Mon, 18 Apr 2011 15:22:11 +0200 (CEST) Date: Mon, 18 Apr 2011 15:22:11 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Cc: "Joseph S. Myers" Subject: [PATCH] Avoid regressing with the PR48248 change Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 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 * 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) {