Patchwork C++ PATCH to remove tf_no_access_control

login
register
mail settings
Submitter Jason Merrill
Date July 25, 2012, 2:53 p.m.
Message ID <5010087E.80601@redhat.com>
Download mbox | patch
Permalink /patch/173184/
State New
Headers show

Comments

Jason Merrill - July 25, 2012, 2:53 p.m.
Now that access control is subject to SFINAE, I was worried that 
tf_no_access_control might cause wrong overload resolution.  On further 
investigation I think that it wasn't a problem, but it is unnecessary.

To preserve the access control checking on default arguments, I changed 
check_default_argument to use perform_implicit_conversion rather than 
can_convert_arg.  As a result, we get several correct errors and 
warnings in the testsuite that we weren't getting previously.

While looking at these new messages, I also changed print_candidates to 
use inform like print_z_candidate, rather than error.

Tested x86_64-pc-linux-gnu, applying to trunk.

Patch

commit 1fff9e1aef357c3f70c10579343dd298257e545c
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Jul 24 15:26:12 2012 -0400

    	* pt.c (print_candidates_1): Use inform instead of error.

diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 532189d..07b294f 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -1718,19 +1718,21 @@  print_candidates_1 (tree fns, bool more, const char **str)
       }
     else
       {
+	tree cand = OVL_CURRENT (fn);
         if (!*str)
           {
             /* Pick the prefix string.  */
             if (!more && !OVL_NEXT (fns))
               {
-                error ("candidate is: %+#D", OVL_CURRENT (fn));
+                inform (DECL_SOURCE_LOCATION (cand),
+			"candidate is: %#D", cand);
                 continue;
               }
 
             *str = _("candidates are:");
             spaces = get_spaces (*str);
           }
-        error ("%s %+#D", *str, OVL_CURRENT (fn));
+        inform (DECL_SOURCE_LOCATION (cand), "%s %#D", *str, cand);
         *str = spaces ? spaces : *str;
       }
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/inline-ns2.C b/gcc/testsuite/g++.dg/cpp0x/inline-ns2.C
index 0385172..17a8bf6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/inline-ns2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/inline-ns2.C
@@ -2,17 +2,17 @@ 
 
 namespace Q {
   inline namespace V1 {
-    extern int i;		// { dg-error "" }
-    extern int j;		// { dg-error "" }
-    void f();			// { dg-error "" }
-    void g();			// { dg-error "" }
+    extern int i;		// { dg-message "" }
+    extern int j;		// { dg-message "" }
+    void f();			// { dg-message "" }
+    void g();			// { dg-message "" }
   }
   inline namespace V2 {
-    extern int j;		// { dg-error "" }
-    void g();			// { dg-error "" }
+    extern int j;		// { dg-message "" }
+    void g();			// { dg-message "" }
   }
-  extern int i;			// { dg-error "" }
-  void f();			// { dg-error "" }
+  extern int i;			// { dg-message "" }
+  void f();			// { dg-message "" }
   void h();
 }
 namespace R {
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for14.C b/gcc/testsuite/g++.dg/cpp0x/range-for14.C
index 26ae477..438555e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for14.C
@@ -59,7 +59,7 @@  void test1()
 
 struct base_begin
 {
-    int *begin(); // { dg-error "" }
+    int *begin(); // { dg-message "" }
 };
 
 struct base_end
diff --git a/gcc/testsuite/g++.dg/lookup/ambig1.C b/gcc/testsuite/g++.dg/lookup/ambig1.C
index 1cf9ab4..c027428 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig1.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig1.C
@@ -7,7 +7,7 @@ 
 // Bug 16889:Undetected ambiguity.
 
 struct B { 
-  int f(); // { dg-error "int B::f" "" }
+  int f(); // { dg-message "int B::f" "" }
 }; 
  
 struct B1 : virtual B {}; 
diff --git a/gcc/testsuite/g++.dg/lookup/ambig2.C b/gcc/testsuite/g++.dg/lookup/ambig2.C
index 4d423d1..505eda6 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig2.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig2.C
@@ -7,7 +7,7 @@ 
 // Bug 16889:Undetected ambiguity.
 
 struct B { 
-  int i; // { dg-error "int B::i" "" }
+  int i; // { dg-message "int B::i" "" }
 }; 
  
 struct B1 : virtual B {}; 
diff --git a/gcc/testsuite/g++.dg/lookup/ambig3.C b/gcc/testsuite/g++.dg/lookup/ambig3.C
index 7a0a837..5a3f5b9 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig3.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig3.C
@@ -7,7 +7,7 @@ 
 // Follow on from Bug 16889:Undetected ambiguity.
 
 struct B { 
-  int f(); // { dg-error "int B::f" "" }
+  int f(); // { dg-message "int B::f" "" }
 }; 
  
 struct B1 : virtual B {}; 
diff --git a/gcc/testsuite/g++.dg/lookup/ambig4.C b/gcc/testsuite/g++.dg/lookup/ambig4.C
index 3a74f7d..1f3daa1 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig4.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig4.C
@@ -4,10 +4,10 @@ 
 
 namespace N
 {
-  int i;            // { dg-error "i" }
+  int i;            // { dg-message "i" }
 }
 
-int i;              // { dg-error "i" }
+int i;              // { dg-message "i" }
 
 using namespace N;
 
diff --git a/gcc/testsuite/g++.dg/lookup/ambig5.C b/gcc/testsuite/g++.dg/lookup/ambig5.C
index cebec27..fb48ff3 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig5.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig5.C
@@ -4,10 +4,10 @@ 
 
 namespace N
 {
-  namespace M {}    // { dg-error "M" }
+  namespace M {}    // { dg-message "M" }
 }
 
-namespace M {}      // { dg-error "M" }
+namespace M {}      // { dg-message "M" }
 
 using namespace N;
 using namespace M;  // { dg-error "namespace-name|ambiguous" }
diff --git a/gcc/testsuite/g++.dg/lookup/crash3.C b/gcc/testsuite/g++.dg/lookup/crash3.C
index 24a3360..5b58e8e 100644
--- a/gcc/testsuite/g++.dg/lookup/crash3.C
+++ b/gcc/testsuite/g++.dg/lookup/crash3.C
@@ -4,8 +4,8 @@ 
 
 typedef __SIZE_TYPE__ size_t; 
 
-struct A { void *operator new(size_t s){} };  // { dg-error "operator new" }
-struct B { void *operator new(size_t s){} };  // { dg-error "operator new" }
+struct A { void *operator new(size_t s){} };  // { dg-message "operator new" }
+struct B { void *operator new(size_t s){} };  // { dg-message "operator new" }
 
 struct C : A,B {}; 
 
diff --git a/gcc/testsuite/g++.dg/lookup/strong-using-2.C b/gcc/testsuite/g++.dg/lookup/strong-using-2.C
index 38bb54c..d9f99a8 100644
--- a/gcc/testsuite/g++.dg/lookup/strong-using-2.C
+++ b/gcc/testsuite/g++.dg/lookup/strong-using-2.C
@@ -5,12 +5,12 @@ 
 
 namespace foo {
   inline namespace foo_impl {
-    class T; // { dg-error "T" "" }
+    class T; // { dg-message "T" "" }
   }
 }
 namespace bar {
   inline namespace bar_impl {
-    class T; // { dg-error "T" "" }
+    class T; // { dg-message "T" "" }
   }
   using namespace foo;
 }
diff --git a/gcc/testsuite/g++.dg/lookup/using16.C b/gcc/testsuite/g++.dg/lookup/using16.C
index a396afb..8a36504 100644
--- a/gcc/testsuite/g++.dg/lookup/using16.C
+++ b/gcc/testsuite/g++.dg/lookup/using16.C
@@ -3,12 +3,12 @@ 
 // { dg-do compile }
 
 namespace M {
-  struct S {}; // { dg-error "struct M::S" "candidate 1" }
+  struct S {}; // { dg-message "struct M::S" "candidate 1" }
 }
 
 namespace N {
   int S;
-  struct S {}; // { dg-error "struct N::S" "candidate 2" }
+  struct S {}; // { dg-message "struct N::S" "candidate 2" }
 }
 
 using namespace M;
diff --git a/gcc/testsuite/g++.dg/lookup/using17.C b/gcc/testsuite/g++.dg/lookup/using17.C
index b98b21a..9019dab 100644
--- a/gcc/testsuite/g++.dg/lookup/using17.C
+++ b/gcc/testsuite/g++.dg/lookup/using17.C
@@ -3,11 +3,11 @@ 
 // { dg-do compile }
 
 namespace M {
-  struct S {}; // { dg-error "struct M::S" "candidate 2" }
+  struct S {}; // { dg-message "struct M::S" "candidate 2" }
 }
 
 int S;
-struct S {}; // { dg-error "candidates are: struct S" "candidate 1" }
+struct S {}; // { dg-message "candidates are: struct S" "candidate 1" }
 
 using namespace M;
 
diff --git a/gcc/testsuite/g++.dg/lookup/using18.C b/gcc/testsuite/g++.dg/lookup/using18.C
index 3755714..d64fbc6 100644
--- a/gcc/testsuite/g++.dg/lookup/using18.C
+++ b/gcc/testsuite/g++.dg/lookup/using18.C
@@ -4,12 +4,12 @@ 
 
 namespace N1 {
   void f ();
-  struct f; // { dg-error "" "candidate" }
+  struct f; // { dg-message "" "candidate" }
 }
 
 namespace N2 {
   void f (int);
-  struct f; // { dg-error "" "candidate" }
+  struct f; // { dg-message "" "candidate" }
 }
 
 namespace M {
diff --git a/gcc/testsuite/g++.dg/lookup/using20.C b/gcc/testsuite/g++.dg/lookup/using20.C
index dc1d293..f1be41f 100644
--- a/gcc/testsuite/g++.dg/lookup/using20.C
+++ b/gcc/testsuite/g++.dg/lookup/using20.C
@@ -2,14 +2,14 @@ 
 
 namespace A
 {
-  int i;			// { dg-error "i" }
+  int i;			// { dg-message "i" }
 }
 using namespace A;
 namespace B
 {
   namespace B2
   {
-    int i;			// { dg-error "i" }
+    int i;			// { dg-message "i" }
   }
   using namespace B2;
 }
diff --git a/gcc/testsuite/g++.dg/parse/ambig4.C b/gcc/testsuite/g++.dg/parse/ambig4.C
index 868f07c..02e39b8 100644
--- a/gcc/testsuite/g++.dg/parse/ambig4.C
+++ b/gcc/testsuite/g++.dg/parse/ambig4.C
@@ -1,12 +1,12 @@ 
 // PR c++/20293
 
-namespace hide { // { dg-error "hide" }
+namespace hide { // { dg-message "hide" }
   int k;
 }
 
 namespace {
   int i; 
-  namespace hide { // { dg-error "hide" }
+  namespace hide { // { dg-message "hide" }
     int j; 
   }
 }
diff --git a/gcc/testsuite/g++.dg/parse/ambig6.C b/gcc/testsuite/g++.dg/parse/ambig6.C
index 8f37fea..0bd2302 100644
--- a/gcc/testsuite/g++.dg/parse/ambig6.C
+++ b/gcc/testsuite/g++.dg/parse/ambig6.C
@@ -1,7 +1,7 @@ 
 // PR c++/48046
 
-namespace N1 { typedef int   T; } // { dg-error "" }
-namespace N2 { typedef float T; } // { dg-error "" }
+namespace N1 { typedef int   T; } // { dg-message "" }
+namespace N2 { typedef float T; } // { dg-message "" }
 
 int main()
 {
diff --git a/gcc/testsuite/g++.dg/parse/crash22.C b/gcc/testsuite/g++.dg/parse/crash22.C
index eaf4d1a..ba88703 100644
--- a/gcc/testsuite/g++.dg/parse/crash22.C
+++ b/gcc/testsuite/g++.dg/parse/crash22.C
@@ -4,17 +4,17 @@ 
 // PR 19030: ICE
 // Origin: Volker Reichelt <reichelt@gcc.gnu.org>
 
-struct A; // { dg-error "A" }
+struct A; // { dg-message "A" }
 
 namespace N
 {
-  struct A; // { dg-error "A" }
+  struct A; // { dg-message "A" }
 }
 
 using namespace N;
 
-int A::i; // { dg-error "ambiguous|declared here" "" }
-int A::i; // { dg-error "ambiguous|redefinition of" "" }
+int A::i; // { dg-message "ambiguous|declared here" "" }
+int A::i; // { dg-message "ambiguous|redefinition of" "" }
 
 namespace N
 {
diff --git a/gcc/testsuite/g++.dg/parse/crash53.C b/gcc/testsuite/g++.dg/parse/crash53.C
index de6d412..c19feaf 100644
--- a/gcc/testsuite/g++.dg/parse/crash53.C
+++ b/gcc/testsuite/g++.dg/parse/crash53.C
@@ -1,9 +1,9 @@ 
 // PR c++/35112
 
-namespace X { struct A; }  // { dg-error "struct X::A" }
-namespace Y { struct A; }  // { dg-error "struct Y::A" }
-namespace Z { struct A; }  // { dg-error "struct Z::A" }
-namespace W { struct A; }  // { dg-error "struct W::A" }
+namespace X { struct A; }  // { dg-message "struct X::A" }
+namespace Y { struct A; }  // { dg-message "struct Y::A" }
+namespace Z { struct A; }  // { dg-message "struct Z::A" }
+namespace W { struct A; }  // { dg-message "struct W::A" }
 
 using namespace X;
 using namespace Y;
diff --git a/gcc/testsuite/g++.dg/parse/non-dependent2.C b/gcc/testsuite/g++.dg/parse/non-dependent2.C
index fee66d4..a2ae81d 100644
--- a/gcc/testsuite/g++.dg/parse/non-dependent2.C
+++ b/gcc/testsuite/g++.dg/parse/non-dependent2.C
@@ -8,14 +8,14 @@ 
 template <class T>
 struct Foo {
   int j; // we never see this one.
-  int k; // { dg-error "Foo" "" }
+  int k; // { dg-message "Foo" "" }
   
 };
 
 struct Baz 
 {
   int j;
-  int k; // { dg-error "candidates" "" }
+  int k; // { dg-message "candidates" "" }
   
 };
 
diff --git a/gcc/testsuite/g++.dg/template/crash92.C b/gcc/testsuite/g++.dg/template/crash92.C
index c0219c4..1153ef6 100644
--- a/gcc/testsuite/g++.dg/template/crash92.C
+++ b/gcc/testsuite/g++.dg/template/crash92.C
@@ -1,7 +1,7 @@ 
 // PR c++/42055
 
-template<typename T> void foo(T, T); // { dg-error "candidates|template" }
+template<typename T> void foo(T, T); // { dg-message "candidates|template" }
 
-template<typename T> void foo(T, int); // { dg-error "template" }
+template<typename T> void foo(T, int); // { dg-message "template" }
 
 template void foo(int, int); // { dg-error "ambiguous template specialization" }
diff --git a/gcc/testsuite/g++.dg/template/injected1.C b/gcc/testsuite/g++.dg/template/injected1.C
index 58b8656..58ec3cb 100644
--- a/gcc/testsuite/g++.dg/template/injected1.C
+++ b/gcc/testsuite/g++.dg/template/injected1.C
@@ -1,6 +1,6 @@ 
 // PR c++/13950, DR 176
 
-template <class T> struct Base { }; // { dg-error "" } candidate
+template <class T> struct Base { }; // { dg-message "" } candidate
 
 struct D1: Base<void>
 {
diff --git a/gcc/testsuite/g++.dg/template/overload10.C b/gcc/testsuite/g++.dg/template/overload10.C
index 088b9d2..84078bd 100644
--- a/gcc/testsuite/g++.dg/template/overload10.C
+++ b/gcc/testsuite/g++.dg/template/overload10.C
@@ -1,6 +1,6 @@ 
 // PR c++40342
 
-template <typename T1, typename T2> int f(T1 *, const T2 *); // { dg-error "" }
-template <typename T1, typename T2> int f(const T1 *, T2 *); // { dg-error "" }
+template <typename T1, typename T2> int f(T1 *, const T2 *); // { dg-message "" }
+template <typename T1, typename T2> int f(const T1 *, T2 *); // { dg-message "" }
 
 int (*p)(const int *, const int *) = f; // { dg-error "ambiguous" }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C
index 9d4edc6..6b8260d 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C
@@ -12,15 +12,15 @@ 
 // keywords: inheritance, ambiguity resolution, members
 
 struct base_0 {
-  enum { base_member }; // { dg-error "" } candidate (26, 30)
+  enum { base_member }; // { dg-message "" } candidate (26, 30)
 };
 
 struct base_1 {
-  int base_member;      // { dg-error "" } candidate (26, 34)
+  int base_member;      // { dg-message "" } candidate (26, 34)
 };
 
 struct base_2 {
-  int base_member ();   // { dg-error "" } candidate (30, 34)
+  int base_member ();   // { dg-message "" } candidate (30, 34)
 };
 
 struct derived_0 : public base_0, public base_1 {
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload20.C b/gcc/testsuite/g++.old-deja/g++.jason/overload20.C
index f5db6a2..ef8504b 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/overload20.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/overload20.C
@@ -4,8 +4,8 @@ 
 void f (char *);
 void f (int);
 struct A {
-  void f ();			// { dg-error "" } candidate
-  void f (int);			// { dg-error "" } candidate
+  void f ();			// { dg-message "" } candidate
+  void f (int);			// { dg-message "" } candidate
   void g () {
     void (*p)(char *) = f;	// { dg-error "" } no matching function in scope
   }
diff --git a/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C b/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C
index 1ccc217..f2a7f1e 100644
--- a/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C
+++ b/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C
@@ -2,12 +2,12 @@ 
 //Based on a report by Bill Currie <bcurrie@tssc.co.nz>
 struct foo {
   protected:
-    int x;        // { dg-error "" } candidate
+    int x;        // { dg-message "" } candidate
 };
 
 struct bar {
   public:
-    int x();      // { dg-error "" } candidate
+    int x();      // { dg-message "" } candidate
 };
 
 struct foobar: public foo, public bar {
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/pmf3.C b/gcc/testsuite/g++.old-deja/g++.mike/pmf3.C
index 8dee927..5ee1e34 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/pmf3.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/pmf3.C
@@ -6,9 +6,9 @@  struct Fooey {
   void h(double dx);
 };
 
-void Fooey::f(char*) { }	// { dg-error "" } candidate
-void Fooey::f(int) { }		// { dg-error "" } candidate
-void Fooey::f(float) { }	// { dg-error "" } candidate
+void Fooey::f(char*) { }	// { dg-message "" } candidate
+void Fooey::f(int) { }		// { dg-message "" } candidate
+void Fooey::f(float) { }	// { dg-message "" } candidate
 void Fooey::h(double zahl) { }
 
 int main() {
diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C b/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C
index 75c8723..69a4fa5 100644
--- a/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C
+++ b/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C
@@ -6,8 +6,8 @@ 
 // Based on bug report by JDonner <jdonner@schedsys.com>
 
 struct foo {
-  static int bar(); // { dg-error "foo::bar" }
-  void bar(int); // { dg-error "foo::bar" }
+  static int bar(); // { dg-message "foo::bar" }
+  void bar(int); // { dg-message "foo::bar" }
 };
 
 /* gcc emits a hard error without -pedantic, and a warning with
diff --git a/gcc/testsuite/g++.old-deja/g++.other/ambig1.C b/gcc/testsuite/g++.old-deja/g++.other/ambig1.C
index f3fe0a8..b18c529 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/ambig1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/ambig1.C
@@ -1,15 +1,15 @@ 
 // { dg-do assemble  }
 
 struct A {
-  int operator ++(); // { dg-error "" } candidates
-  void operator ()(); // { dg-error "" } candidates
-  void operator delete(void*); // { dg-error "" } candidates
+  int operator ++(); // { dg-message "" } candidates
+  void operator ()(); // { dg-message "" } candidates
+  void operator delete(void*); // { dg-message "" } candidates
 };
 
 struct B {
-  int operator ++(int); // { dg-error "" } candidates
-  void operator ()(); // { dg-error "" } candidates
-  void operator delete(void*); // { dg-error "" } candidates
+  int operator ++(int); // { dg-message "" } candidates
+  void operator ()(); // { dg-message "" } candidates
+  void operator delete(void*); // { dg-message "" } candidates
   void f();
 };
 
diff --git a/gcc/testsuite/g++.old-deja/g++.other/lineno2.C b/gcc/testsuite/g++.old-deja/g++.other/lineno2.C
index 3735d64..d6aca8b 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/lineno2.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/lineno2.C
@@ -2,9 +2,9 @@ 
 // Submitted by Nathan Sidwell <nathan@acm.org>
 // Bug: g++ wasn't listing candidates for a failed conversion.
 
-void f(int, double);		// { dg-error "" } candidate
-void f(double, int);		// { dg-error "" } candidate
-void f(int);			// { dg-error "" } candidate
+void f(int, double);		// { dg-message "" } candidate
+void f(double, int);		// { dg-message "" } candidate
+void f(int);			// { dg-message "" } candidate
 
 int
 main ()
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash58.C b/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
index 0ce3d81..f0b609a 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
@@ -6,9 +6,9 @@ 
 // bug 147. We ICE'd on an unprocessed LOOKUP_EXPR during tsubsting
 
 namespace EManip {
-    template <class T> void do_assign(T* d);  // { dg-error "" } candidate
+    template <class T> void do_assign(T* d);  // { dg-message "" } candidate
 }
-template <class T> void do_assign(T* d);    // { dg-error "" } candidate
+template <class T> void do_assign(T* d);    // { dg-message "" } candidate
 
 template <class T>
 struct MatrixC
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C b/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C
index 03b5858..c58bd6e 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C
@@ -12,7 +12,7 @@  struct A {
 template <int s>
 static void g();
 template <int s>
-void f();         // { dg-error "" } candiate
+void f();         // { dg-message "" } candiate
 
 static void f_plus ()
   {
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/overload5.C b/gcc/testsuite/g++.old-deja/g++.pt/overload5.C
index 1bb2d44..50febb2 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/overload5.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/overload5.C
@@ -1,6 +1,6 @@ 
 // { dg-do assemble  }
 
-template <class T> void foo();	// { dg-error "" } candidate
+template <class T> void foo();	// { dg-message "" } candidate
 
 void (*bar)() = foo<void>;
 void (*baz)() = foo; // { dg-error "" } can't deduce T