From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95523 invoked by alias); 14 May 2015 12:47:12 -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 95509 invoked by uid 89); 14 May 2015 12:47:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 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; Thu, 14 May 2015 12:47:10 +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 t4ECl8Is032107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 May 2015 08:47:08 -0400 Received: from localhost.localdomain (ovpn-113-21.phx2.redhat.com [10.3.113.21]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4ECl7pv027144; Thu, 14 May 2015 08:47:07 -0400 Message-ID: <5554994A.5030109@redhat.com> Date: Thu, 14 May 2015 12:54:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Iain Buclaw , gcc-patches , Ian Lance Taylor Subject: Re: [PATCH 1/7] [D] libiberty: Correctly decode white or non-printable characters References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg01310.txt.bz2 On 05/13/2015 02:51 AM, Iain Buclaw wrote: > Hi, > > Started these as separate patches, but as more came out of what I was > originally trying to achieve (see Patch 6/7), I thought it better to > have it as a running series. > > These set out to update d-demangle.c for new ABI additions, general > bug fixes, and improved template support. > --- > > D templates can have string literals encoded inside them, which can > also include tabs, newlines, and other whitespace characters. For > example: > > return getHost!q{ > auto he = gethostbyname(toStringz(param)); > }(name); > > > In this case, rather than decoding and writing out every character > directly, whitespace or other non-printable characters should be > represented as escape sequences. > > --- > libiberty/ChangeLog: > > 2015-05-13 Iain Buclaw > > * d-demangle.c (dlang_parse_string): Represent embedded whitespace or > non-printable characters as hex or escape sequences. > * testsuite/d-demangle-expected: Add test for templates with tabs and > newlines embedded into the signature. OK. jeff