This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch] Prefer error + inform to two errors in check_template_shadow


On 07/13/2015 09:41 AM, Paolo Carlini wrote:
+++ testsuite/g++.dg/template/crash81.C	(working copy)
@@ -3,6 +3,6 @@
  struct A
  {
    template<T::X> struct X; // { dg-error "'T' has not been declared" "T" }
-  // { dg-error "declaration of 'template<int X> struct A::X'" "A::X" { target *-*-* } 5 }
-  // { dg-error "shadows template parm 'int X'" "shadow" { target *-*-* } 5 }
+  // { dg-error "declaration of 'template<int X> struct A::X' shadows" "A::X" { target *-*-* } 5 }
+  // { dg-message "template parameter 'X'" "" { target *-*-* } 5 }

I don't see any reason to check for specific diagnostics here; the latter two messages are poor error-recovery, not something to test for.

OK with that change.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]