From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32184 invoked by alias); 20 May 2015 14:42:46 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 32169 invoked by uid 89); 20 May 2015 14:42:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 May 2015 14:42:45 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4KEgiMJ030210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 20 May 2015 10:42:44 -0400 Received: from [10.10.116.38] ([10.10.116.38]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4KEgh9K022935; Wed, 20 May 2015 10:42:43 -0400 Message-ID: <555C9D5F.1010609@redhat.com> Date: Wed, 20 May 2015 14:58:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: =?windows-1252?Q?Manuel_L=F3pez-Ib=E1=F1ez?= , Patrick Palka , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix memory leak in C++ pretty printer References: <1431308052-31361-1-git-send-email-patrick@parcs.ath.cx> <5550A8BB.1010001@gmail.com> <5550ED88.5040103@redhat.com> <5550EE77.5060208@redhat.com> In-Reply-To: <5550EE77.5060208@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2015-05/txt/msg01844.txt.bz2 On 05/11/2015 02:01 PM, Jason Merrill wrote: > On 05/11/2015 12:57 PM, Jason Merrill wrote: >> On 05/11/2015 08:03 AM, Manuel López-Ibáñez wrote: >>> My preference would be to replace the static with a pointer and >>> placement-new with proper new and delete > > Actually, on second thought, there really doesn't seem to be a need for > that. The patch should be OK; if it doesn't work I'd like to know why. > I think the existing pattern is just a holdover from the C days. So go ahead and apply the patch. If you would also make the similar fix to other front ends, that would be great, too. Jason