diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3d412443a7be567d126cd02594eeff148153a975..a6e6f3a85e8dfb11b6e2a59dd393c5c0c260a4ab 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2010-04-07  Jason Merrill  <jason@redhat.com>
+
+	PR c++/41970
+	* decl.c (grokvardecl): Tweak warning message.
+	(grokfndecl): Likewise.
+
 2010-04-07  Dodji Seketeli  <dodji@redhat.com>
 
 	PR c++/42697
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index a308d64d9fff27a4026f55f4f7db600b58e421c3..4ae924b32ad42e72276c5d94efc1de57c1fb88eb 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6821,8 +6821,9 @@ grokfndecl (tree ctype,
 		/* Allow this; it's pretty common in C.  */;
 	      else
 		{
-		  permerror (input_location, "non-local function %q#D uses anonymous type",
-			      decl);
+		  permerror (input_location, "anonymous type with no linkage "
+			     "used to declare function %q#D with linkage",
+			     decl);
 		  if (DECL_ORIGINAL_TYPE (TYPE_NAME (t)))
 		    permerror (input_location, "%q+#D does not refer to the unqualified "
 			       "type, so it is not used for linkage",
@@ -6830,7 +6831,8 @@ grokfndecl (tree ctype,
 		}
 	    }
 	  else
-	    permerror (input_location, "non-local function %q#D uses local type %qT", decl, t);
+	    permerror (input_location, "type %qT with no linkage used to "
+		       "declare function %q#D with linkage", t, decl);
 	}
     }
 
@@ -7104,8 +7106,8 @@ grokvardecl (tree type,
 		     no linkage can only be used to declare extern "C"
 		     entities.  Since it's not always an error in the
 		     ISO C++ 90 Standard, we only issue a warning.  */
-		  warning (0, "non-local variable %q#D uses anonymous type",
-			   decl);
+		  warning (0, "anonymous type with no linkage used to declare "
+			   "variable %q#D with linkage", decl);
 		  if (DECL_ORIGINAL_TYPE (TYPE_NAME (t)))
 		    warning (0, "%q+#D does not refer to the unqualified "
 			     "type, so it is not used for linkage",
@@ -7113,7 +7115,8 @@ grokvardecl (tree type,
 		}
 	    }
 	  else
-	    warning (0, "non-local variable %q#D uses local type %qT", decl, t);
+	    warning (0, "type %qT with no linkage used to declare variable "
+		     "%q#D with linkage", t, decl);
 	}
     }
   else
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0032dd813b0d6b1df11003f8cee7f4dcbdb1dbbd..3138c8a3d1cf2e261bc7d8b81f491d12ed3a7361 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-07  Jason Merrill  <jason@redhat.com>
+
+	PR c++/41970
+	* g++.old-deja/g++.other/linkage1.C: Adjust.
+
 2010-04-07  Dodji Seketeli  <dodji@redhat.com>
 
 	PR c++/42697
diff --git a/gcc/testsuite/g++.old-deja/g++.other/linkage1.C b/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
index e9b5a9d2aa32f96d6dba8a3f0c8a0277e83a7a0e..556ef9716a8d6f89e28b854398b16642e5275d5e 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
@@ -3,13 +3,13 @@ typedef struct {
   int i;
 } *p;
 
-void f (p) { }			// { dg-error "uses anonymous type" }
-p q;				// { dg-warning "uses anonymous type" } 
+void f (p) { }			// { dg-error "with no linkage" }
+p q;				// { dg-warning "with no linkage" }
 
 int main()
 {
-  extern p j;			// { dg-warning "uses anonymous type" }
+  extern p j;			// { dg-warning "with no linkage" }
   struct A { int j; };
-  extern A a;			// { dg-warning "uses local type" }
-  extern void f (A);		// { dg-error "uses local type" }
+  extern A a;			// { dg-warning "with no linkage" }
+  extern void f (A);		// { dg-error "with no linkage" }
 }