From patchwork Sat Jun 18 13:01:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 100919 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]) by ozlabs.org (Postfix) with SMTP id 459BBB6FF5 for ; Sat, 18 Jun 2011 23:01:43 +1000 (EST) Received: (qmail 30513 invoked by alias); 18 Jun 2011 13:01:41 -0000 Received: (qmail 30505 invoked by uid 22791); 18 Jun 2011 13:01:41 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_CX, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Jun 2011 13:01:20 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5ID1I1X028623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 18 Jun 2011 09:01:18 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5ID1HYQ031906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Jun 2011 09:01:17 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p5ID1G8n013426; Sat, 18 Jun 2011 15:01:16 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p5ID1G6I013425; Sat, 18 Jun 2011 15:01:16 +0200 Date: Sat, 18 Jun 2011 15:01:16 +0200 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches List Subject: Re: C++ PATCH for c++/49117 (error message regression on conversion failure) Message-ID: <20110618130116.GS17079@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <4DF79CA1.7010001@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4DF79CA1.7010001@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 On Tue, Jun 14, 2011 at 01:38:41PM -0400, Jason Merrill wrote: > commit 16136651e85c19a1e8338a0bd1b2b1a453413c23 > Author: Jason Merrill > Date: Tue Jun 14 09:43:25 2011 -0400 > > * error.c (type_to_string): Print typedef-stripped version too. > > diff --git a/gcc/cp/error.c b/gcc/cp/error.c > index 96796c2..22470dc 100644 > --- a/gcc/cp/error.c > +++ b/gcc/cp/error.c > @@ -2632,6 +2632,15 @@ type_to_string (tree typ, int verbose) > > reinit_cxx_pp (); > dump_type (typ, flags); > + if (typ && TYPE_P (typ) && typ != TYPE_CANONICAL (typ) > + && !uses_template_parms (typ)) > + { > + tree aka = strip_typedefs (typ); > + pp_string (cxx_pp, " {aka"); > + pp_cxx_whitespace (cxx_pp); > + dump_type (aka, flags); > + pp_character (cxx_pp, '}'); > + } > return pp_formatted_text (cxx_pp); > } > This caused FAIL: obj-c++.dg/invalid-type-1.mm -fgnu-runtime (test for errors, line 21) FAIL: obj-c++.dg/invalid-type-1.mm -fgnu-runtime (test for errors, line 24) FAIL: obj-c++.dg/invalid-type-1.mm -fgnu-runtime (test for excess errors) failures, fixed thusly, committed as obvious to trunk and 4.6: 2011-06-18 Jakub Jelinek PR testsuite/49432 * obj-c++.dg/invalid-type-1.mm: Adjust for new error wording. Jakub --- gcc/testsuite/obj-c++.dg/invalid-type-1.mm.jj 2010-11-15 18:53:29.000000000 +0100 +++ gcc/testsuite/obj-c++.dg/invalid-type-1.mm 2011-06-18 14:52:57.873566940 +0200 @@ -18,8 +18,8 @@ id object; /* This is fine. AClass *object1; /* This is fine. */ -Integer *object2; /* { dg-error ".Integer. is not a template" } */ +Integer *object2; /* { dg-error ".Integer {aka int}. is not a template" } */ /* { dg-error ".MyProtocol. was not declared in this scope" "" { target *-*-* } 21 } */ -Integer *object3; /* { dg-error ".Integer. is not a template" } */ +Integer *object3; /* { dg-error ".Integer {aka int}. is not a template" } */ /* { dg-error ".NonExistingProtocol. was not declared in this scope" "" { target *-*-* } 24 } */