From patchwork Thu Mar 5 13:50:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 446711 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 696151400EA for ; Fri, 6 Mar 2015 00:56:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ABGrqmWQ; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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=taWkNVvyytE4whz/ qc0M0uusQJQWIIvzmI0iHs3wFFDC20Tc8dMsq2mp3/NGaWVshh7u8vWTscTjdqj+ hhoV+5j6P6qSLbXI8LPODVaO1XgYIKsWHLqxsUMd5KrokTCYYQbFyn+R7o4NHjqo 1kCmUhWhMRKCP7YAybYugXPWwHc= 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=Y/3k9LzMhuJaNJlsM3K3QC rX9P8=; b=ABGrqmWQ1QPq6vTa9mK8R1z63ivUiLtp7NiSWK2WuEXOUKRMiAu+k6 uxi5QzwzVhiximq9PsDQ13hF7Z4RdMCLEDEUcaErGmEIEBmIjW9kgPBB3Zo92EKo dTfxPHUyvDaVZIHg0NcRWHEWhxntWDK/Ck9yMbw6IcKWYjfpQBgRc= Received: (qmail 22781 invoked by alias); 5 Mar 2015 13:56:23 -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 22726 invoked by uid 89); 5 Mar 2015 13:56:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 05 Mar 2015 13:56:12 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id B3C32281551D for ; Thu, 5 Mar 2015 14:56:09 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a-ot0gSjTkZX for ; Thu, 5 Mar 2015 14:56:09 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 986302815510 for ; Thu, 5 Mar 2015 14:56:09 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Fix PR ada/65319 Date: Thu, 05 Mar 2015 14:50:55 +0100 Message-ID: <2709764.5anrH8MBvI@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 This removes obsolete code in c-ada-spec.c that valgrind rightfully complains about and should fix the PR in the process. Tested on x86_64-linux-gnu, applied on the mainline and 4.9 branch. 2015-03-05 Eric Botcazou PR ada/65319 * c-ada-spec.c (print_destructor): Remove obsolete code. diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c index 007c176..9c633b5 100644 --- a/gcc/c-family/c-ada-spec.c +++ b/gcc/c-family/c-ada-spec.c @@ -2665,18 +2665,9 @@ static void print_destructor (pretty_printer *buffer, tree t) { tree decl_name = DECL_NAME (DECL_ORIGIN (t)); - const char *s = IDENTIFIER_POINTER (decl_name); - if (*s == '_') - { - for (s += 2; *s != ' '; s++) - pp_character (buffer, *s); - } - else - { - pp_string (buffer, "Delete_"); - pp_ada_tree_identifier (buffer, decl_name, t, false); - } + pp_string (buffer, "Delete_"); + pp_ada_tree_identifier (buffer, decl_name, t, false); } /* Return the name of type T. */