From patchwork Sun Apr 21 07:59:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 238200 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 8DE102C0132 for ; Sun, 21 Apr 2013 18:02:35 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=pGDqh8WjMRhclaiL TRHayD9Co32tvEBvp/IkVthp4HjQFjlWa+dXUKxLs69aDpADyRZ8LC5RbLQeDm2y Xlr5CS8lhUjnVTQ/oiDfJw6n8E4XfvNeyHu0MYvgLnTXuYbWSFAOpi6DQlE8xP56 f11pivS1A6HuFe0TTmZy9GFsudw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=35bq+VZ0IELhoqkkMVd+SU x27NA=; b=vcbX8oCNvXt4NHn70S/G5djGuS8HkDFpZkne8XQm9HyHXUtHL9AW54 H/Xgpslsm9qq2JJuHHKqdKt/N7RzmafCVNV7Aq1J4o0n3DE5Af7nrS4yFy2o7Vs6 GzhkQ4OfKYdsKyRBBzVoyXDToNibQdcJpTqgQzzQglTtLBfRrk4S0= Received: (qmail 2827 invoked by alias); 21 Apr 2013 08:02:28 -0000 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 Received: (qmail 2817 invoked by uid 89); 21 Apr 2013 08:02:27 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.1 Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 21 Apr 2013 08:02:27 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id D7B08290024 for ; Sun, 21 Apr 2013 10:02:23 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bcrueyNSGI1U for ; Sun, 21 Apr 2013 10:02:23 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id AE2E8290007 for ; Sun, 21 Apr 2013 10:02:23 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [4.7] Fix a couple of C++isms Date: Sun, 21 Apr 2013 09:59:04 +0200 Message-ID: <7725102.aKVEupMyhz@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.19-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 X-Virus-Found: No Bootstrapped/regtested on x86_64-suse-linux, applied as obvious. 2013-04-21 Eric Botcazou * cfgexpand.c (avoid_complex_debug_insns): Fix C++ism. cp/ * parser.c (cp_parser_late_return_type_opt): Likewise. Index: cp/parser.c =================================================================== --- cp/parser.c (revision 198109) +++ cp/parser.c (working copy) @@ -16691,7 +16691,7 @@ static tree cp_parser_late_return_type_opt (cp_parser* parser, cp_cv_quals quals) { cp_token *token; - tree type; + tree type, save_ccp, save_ccr; /* Peek at the next token. */ token = cp_lexer_peek_token (parser->lexer); @@ -16702,8 +16702,8 @@ cp_parser_late_return_type_opt (cp_parse /* Consume the ->. */ cp_lexer_consume_token (parser->lexer); - tree save_ccp = current_class_ptr; - tree save_ccr = current_class_ref; + save_ccp = current_class_ptr; + save_ccr = current_class_ref; if (quals >= 0) { /* DR 1207: 'this' is in scope in the trailing return type. */ Index: cfgexpand.c =================================================================== --- cfgexpand.c (revision 198109) +++ cfgexpand.c (working copy) @@ -3646,6 +3646,8 @@ static void avoid_complex_debug_insns (rtx insn, rtx *exp_p, int depth) { rtx exp = *exp_p; + const char *format_ptr; + int i, j; if (exp == NULL_RTX) return; @@ -3668,8 +3670,7 @@ avoid_complex_debug_insns (rtx insn, rtx return; } - const char *format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); - int i, j; + format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); for (i = 0; i < GET_RTX_LENGTH (GET_CODE (exp)); i++) switch (*format_ptr++) {