On Tue, Jun 14, 2011 at 01:38:41PM -0400, Jason Merrill wrote: > commit 16136651e85c19a1e8338a0bd1b2b1a453413c23 > Author: Jason Merrill <ja...@redhat.com> > 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 <ja...@redhat.com> PR testsuite/49432 * obj-c++.dg/invalid-type-1.mm: Adjust for new error wording. --- 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 <MyProtocol> object; /* This is fine. AClass <MyProtocol> *object1; /* This is fine. */ -Integer <MyProtocol> *object2; /* { dg-error ".Integer. is not a template" } */ +Integer <MyProtocol> *object2; /* { dg-error ".Integer {aka int}. is not a template" } */ /* { dg-error ".MyProtocol. was not declared in this scope" "" { target *-*-* } 21 } */ -Integer <NonExistingProtocol> *object3; /* { dg-error ".Integer. is not a template" } */ +Integer <NonExistingProtocol> *object3; /* { dg-error ".Integer {aka int}. is not a template" } */ /* { dg-error ".NonExistingProtocol. was not declared in this scope" "" { target *-*-* } 24 } */ Jakub