From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14888 invoked by alias); 10 Nov 2014 21:42:17 -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 14875 invoked by uid 89); 10 Nov 2014 21:42:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f178.google.com Received: from mail-qc0-f178.google.com (HELO mail-qc0-f178.google.com) (209.85.216.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 10 Nov 2014 21:42:15 +0000 Received: by mail-qc0-f178.google.com with SMTP id b13so7290083qcw.37 for ; Mon, 10 Nov 2014 13:42:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FLimrQD53/CgBFJHIOuK6FunKGBCOQoDoEd5xDeJlQk=; b=a9X3fJN9/HdL+eOODNIVAJJVZ7pOC88BcjD1Wue4UmiD3vK5Z4SstSMMD1yft0HwX4 aN8gfZYqntfBPC+E/o5lIhcpuFuSzBz2ti2Dq1FeCx3sax4AZdLyg0i6osfGttUi+6P8 QWnkVvYchJCds0PK/hnIR9GzFIrFi2zmkl8x1TooUcHx35tw7kVrzo7WgZKbpFCSXxfs aGapTUOE+GFO9zfq77A3lxaJeJMl6M+UYO4c81MiHUt1KxiFBvHf8cmf7VNFRUUz3KMd 3dF4eaL2Ukw5FbCUdnL9brEEgQkBLQJzKzXxY/w5uYDKcOt0EKAOub9E3JQw7ugJn6lV 9mWg== X-Gm-Message-State: ALoCoQmZdjU2EEOfBn+YsEW/BWKm10R3AqYqeeXgqFAEGkNqlRctjwTwkn6nw+GDv/idKaNTTdUG MIME-Version: 1.0 X-Received: by 10.224.130.198 with SMTP id u6mr46193284qas.99.1415655732997; Mon, 10 Nov 2014 13:42:12 -0800 (PST) Received: by 10.140.42.48 with HTTP; Mon, 10 Nov 2014 13:42:12 -0800 (PST) In-Reply-To: References: <1401191856-27585-1-git-send-email-palves@redhat.com> <1401191856-27585-3-git-send-email-palves@redhat.com> <538C7F4F.4050800@redhat.com> <53D22072.4000200@redhat.com> Date: Mon, 10 Nov 2014 21:45:00 -0000 Message-ID: Subject: Re: [PATCH 2/3] PR other/61321 - demangler crash on casts in template parameters From: Cary Coutant To: Jason Merrill Cc: gcc-patches , Pedro Alves Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00877.txt.bz2 Ping. I'm getting more reports of this bug internally, and it would be nice to have the fix upstream. -cary On Mon, Oct 13, 2014 at 11:43 AM, Cary Coutant wrote: > Ping. Jason, do you still think the special-case for conversion ops is > inappropriate? > > -cary > > > On Fri, Jul 25, 2014 at 2:16 AM, Pedro Alves wrote: >> On 07/24/2014 11:35 PM, Cary Coutant wrote: >>>> It seems that the problem here is more general; a template argument list is >>>> not in scope within that same template argument list. Can't we fix that >>>> without special-casing conversion ops? >>> >>> I think conversion ops really are a special case. >> >> Thanks Cary. FWIW, I agree. >> >> (GDB 7.8 hasn't been released yet, though it's close. If this >> patch is approved as is, we'll be able to have the crash >> fixed there. If this requires a significant rewrite though, >> I'm afraid I might not be able to do it myself anytime soon.) >> >>> It's the only case >>> where the template parameters refer to the template argument list from >>> the cast operator's enclosing template. In a cast expression, like >>> anywhere else you might have a template parameter, the template >>> parameter refers to the template argument list of the immediately >>> enclosing template. >>> >>> I think this note from Section 5.1.3 (Operator Encodings) of the ABI >>> is what makes this a special case (it's an informative comment in the >>> document, but seems to me to be normative): >>> >>> "For a user-defined conversion operator the result type (i.e., the >>> type to which the operator converts) is part of the mangled name of >>> the function. If the conversion operator is a member template, the >>> result type will appear before the template parameters. There may be >>> forward references in the result type to the template parameters." >>> >> >> -- >> Thanks, >> Pedro Alves >>