Patchwork [C++] Use inform more

login
register
mail settings
Submitter Paolo Carlini
Date Aug. 12, 2013, 5:32 p.m.
Message ID <52091C41.5090408@oracle.com>
Download mbox | patch
Permalink /patch/266598/
State New
Headers show

Comments

Paolo Carlini - Aug. 12, 2013, 5:32 p.m.
Hi,

today I wanted to add a testcase and noticed again that in quite a few 
cases we still use a second error call for the "previous 
declaration"-type message. Thus the below, consisting mostly of 
testsuite adjustments, the code changes themselves should be largely 
obvious.

Tested x86_64-linux.

Thanks!
Paolo.

///////////////////////////
2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* config/i386/i386.c (ix86_function_versions): Use error + inform.

/cp
2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (warn_extern_redeclared_static, duplicate_decls,
	check_elaborated_type_specifier): Use error + inform.
	* friend.c (make_friend_class): Likewise.
	* semantics.c (finish_id_expression): Likewise.

/testsuite
2013-08-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/cpp0x/constexpr-function2.C: Adjust for error -> inform
	changes.
	* g++.dg/cpp0x/constexpr-neg1.C: Likewise.
	* g++.dg/cpp0x/defaulted2.C: Likewise.
	* g++.dg/cpp0x/defaulted31.C: Likewise.
	* g++.dg/cpp0x/error6.C: Likewise.
	* g++.dg/cpp0x/gen-attrs-32.C: Likewise.
	* g++.dg/cpp0x/override2.C: Likewise.
	* g++.dg/cpp0x/parse1.C: Likewise.
	* g++.dg/cpp0x/scoped_enum.C: Likewise.
	* g++.dg/cpp0x/temp_default4.C: Likewise.
	* g++.dg/ext/attrib32.C: Likewise.
	* g++.dg/ext/gnu-inline-global-reject.C: Likewise.
	* g++.dg/ext/mv13.C: Likewise.
	* g++.dg/ext/mv7.C: Likewise.
	* g++.dg/ext/mv9.C: Likewise.
	* g++.dg/ext/pr57362.C: Likewise.
	* g++.dg/ext/typeof10.C: Likewise.
	* g++.dg/lookup/anon6.C: Likewise.
	* g++.dg/lookup/crash6.C: Likewise.
	* g++.dg/lookup/name-clash5.C: Likewise.
	* g++.dg/lookup/name-clash6.C: Likewise.
	* g++.dg/other/anon4.C: Likewise.
	* g++.dg/other/error15.C: Likewise.
	* g++.dg/other/error8.C: Likewise.
	* g++.dg/other/redecl2.C: Likewise.
	* g++.dg/parse/crash16.C: Likewise.
	* g++.dg/parse/crash21.C: Likewise.
	* g++.dg/parse/crash38.C: Likewise.
	* g++.dg/parse/redef2.C: Likewise.
	* g++.dg/parse/struct-as-enum1.C: Likewise.
	* g++.dg/template/crash39.C: Likewise.
	* g++.dg/template/redecl3.C: Likewise.
	* g++.dg/tls/diag-3.C: Likewise.
	* g++.dg/warn/Wredundant-decls-spec.C: Likewise.
	* g++.old-deja/g++.benjamin/typedef01.C: Likewise.
	* g++.old-deja/g++.benjamin/warn02.C: Likewise.
	* g++.old-deja/g++.brendan/crash16.C: Likewise.
	* g++.old-deja/g++.brendan/crash18.C: Likewise.
	* g++.old-deja/g++.brendan/err-msg4.C: Likewise.
	* g++.old-deja/g++.brendan/redecl1.C: Likewise.
	* g++.old-deja/g++.brendan/static3.C: Likewise.
	* g++.old-deja/g++.bugs/900127_02.C: Likewise.
	* g++.old-deja/g++.jason/binding.C: Likewise.
	* g++.old-deja/g++.jason/crash4.C: Likewise.
	* g++.old-deja/g++.jason/crash7.C: Likewise.
	* g++.old-deja/g++.jason/lineno.C: Likewise.
	* g++.old-deja/g++.jason/scoping7.C: Likewise.
	* g++.old-deja/g++.mike/misc3.C: Likewise.
	* g++.old-deja/g++.mike/net44.C: Likewise.
	* g++.old-deja/g++.mike/ns3.C: Likewise.
	* g++.old-deja/g++.ns/alias4.C: Likewise.
	* g++.old-deja/g++.ns/ns11.C: Likewise.
	* g++.old-deja/g++.other/crash23.C: Likewise.
	* g++.old-deja/g++.other/decl8.C: Likewise.
	* g++.old-deja/g++.other/linkage3.C: Likewise.
	* g++.old-deja/g++.other/typeck1.C: Likewise.
	* g++.old-deja/g++.other/typedef5.C: Likewise.
	* g++.old-deja/g++.pt/explicit34.C: Likewise.
	* g++.old-deja/g++.pt/friend36.C: Likewise.
	* obj-c++.dg/method-8.mm: Likewise.
	* obj-c++.dg/tls/diag-3.mm: Likewise.
Jason Merrill - Aug. 12, 2013, 8:59 p.m.
OK.

Jason

Patch

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 201661)
+++ config/i386/i386.c	(working copy)
@@ -29870,8 +29870,8 @@  ix86_function_versions (tree fn1, tree fn2)
 	  error_at (DECL_SOURCE_LOCATION (fn2),
 		    "missing %<target%> attribute for multi-versioned %D",
 		    fn2);
-	  error_at (DECL_SOURCE_LOCATION (fn1),
-		    "previous declaration of %D", fn1);
+	  inform (DECL_SOURCE_LOCATION (fn1),
+		  "previous declaration of %D", fn1);
 	  /* Prevent diagnosing of the same error multiple times.  */
 	  DECL_ATTRIBUTES (fn2)
 	    = tree_cons (get_identifier ("target"),
Index: cp/decl.c
===================================================================
--- cp/decl.c	(revision 201661)
+++ cp/decl.c	(working copy)
@@ -1146,8 +1146,9 @@  warn_extern_redeclared_static (tree newdecl, tree
       && DECL_ARTIFICIAL (olddecl))
     return;
 
-  permerror (input_location, "%qD was declared %<extern%> and later %<static%>", newdecl);
-  permerror (input_location, "previous declaration of %q+D", olddecl);
+  if (permerror (input_location,
+		 "%qD was declared %<extern%> and later %<static%>", newdecl))
+    inform (input_location, "previous declaration of %q+D", olddecl);
 }
 
 /* NEW_DECL is a redeclaration of OLD_DECL; both are functions or
@@ -1287,19 +1288,19 @@  duplicate_decls (tree newdecl, tree olddecl, bool
 	       && DECL_UNINLINABLE (olddecl)
 	       && lookup_attribute ("noinline", DECL_ATTRIBUTES (olddecl)))
 	{
-	  warning (OPT_Wattributes, "function %q+D redeclared as inline",
-		   newdecl);
-	  warning (OPT_Wattributes, "previous declaration of %q+D "
-		   "with attribute noinline", olddecl);
+	  if (warning (OPT_Wattributes, "function %q+D redeclared as inline",
+		       newdecl))
+	    inform (input_location, "previous declaration of %q+D "
+		    "with attribute noinline", olddecl);
 	}
       else if (DECL_DECLARED_INLINE_P (olddecl)
 	       && DECL_UNINLINABLE (newdecl)
 	       && lookup_attribute ("noinline", DECL_ATTRIBUTES (newdecl)))
 	{
-	  warning (OPT_Wattributes, "function %q+D redeclared with "
-		   "attribute noinline", newdecl);
-	  warning (OPT_Wattributes, "previous declaration of %q+D was inline",
-		   olddecl);
+	  if (warning (OPT_Wattributes, "function %q+D redeclared with "
+		       "attribute noinline", newdecl))
+	    inform (input_location, "previous declaration of %q+D was inline",
+		    olddecl);
 	}
     }
 
@@ -1485,7 +1486,7 @@  duplicate_decls (tree newdecl, tree olddecl, bool
       error ("%q#D redeclared as different kind of symbol", newdecl);
       if (TREE_CODE (olddecl) == TREE_LIST)
 	olddecl = TREE_VALUE (olddecl);
-      error ("previous declaration of %q+#D", olddecl);
+      inform (input_location, "previous declaration of %q+#D", olddecl);
 
       return error_mark_node;
     }
@@ -1550,7 +1551,8 @@  duplicate_decls (tree newdecl, tree olddecl, bool
       else
 	{
 	  error ("conflicting declaration %q#D", newdecl);
-	  error ("%q+D has a previous declaration as %q#D", olddecl, olddecl);
+	  inform (input_location,
+		  "%q+D has a previous declaration as %q#D", olddecl, olddecl);
 	  return error_mark_node;
 	}
     }
@@ -1613,9 +1615,10 @@  duplicate_decls (tree newdecl, tree olddecl, bool
 	{
 	  error_at (DECL_SOURCE_LOCATION (newdecl), errmsg, newdecl);
 	  if (DECL_NAME (olddecl) != NULL_TREE)
-	    error ((DECL_INITIAL (olddecl) && namespace_bindings_p ())
-		   ? G_("%q+#D previously defined here")
-		   : G_("%q+#D previously declared here"), olddecl);
+	    inform (input_location,
+		    (DECL_INITIAL (olddecl) && namespace_bindings_p ())
+		    ? G_("%q+#D previously defined here")
+		    : G_("%q+#D previously declared here"), olddecl);
 	  return error_mark_node;
 	}
       else if (TREE_CODE (olddecl) == FUNCTION_DECL
@@ -1759,8 +1762,10 @@  duplicate_decls (tree newdecl, tree olddecl, bool
 	  && (! DECL_TEMPLATE_SPECIALIZATION (newdecl)
 	      || DECL_TEMPLATE_SPECIALIZATION (olddecl)))
 	{
-	  warning (OPT_Wredundant_decls, "redundant redeclaration of %qD in same scope", newdecl);
-	  warning (OPT_Wredundant_decls, "previous declaration of %q+D", olddecl);
+	  if (warning (OPT_Wredundant_decls,
+		       "redundant redeclaration of %qD in same scope",
+		       newdecl))
+	    inform (input_location, "previous declaration of %q+D", olddecl);
 	}
 
       if (!(DECL_TEMPLATE_INSTANTIATION (olddecl)
@@ -11836,14 +11841,14 @@  check_elaborated_type_specifier (enum tag_types ta
 	   && tag_code != typename_type)
     {
       error ("%qT referred to as %qs", type, tag_name (tag_code));
-      error ("%q+T has a previous declaration here", type);
+      inform (input_location, "%q+T has a previous declaration here", type);
       return error_mark_node;
     }
   else if (TREE_CODE (type) != ENUMERAL_TYPE
 	   && tag_code == enum_type)
     {
       error ("%qT referred to as enum", type);
-      error ("%q+T has a previous declaration here", type);
+      inform (input_location, "%q+T has a previous declaration here", type);
       return error_mark_node;
     }
   else if (!allow_template_p
Index: cp/friend.c
===================================================================
--- cp/friend.c	(revision 201661)
+++ cp/friend.c	(working copy)
@@ -327,7 +327,7 @@  make_friend_class (tree type, tree friend_type, bo
 		{
 		  error ("%qT is not a member class template of %qT",
 			 name, ctype);
-		  error ("%q+D declared here", decl);
+		  inform (input_location, "%q+D declared here", decl);
 		  return;
 		}
 	      if (!template_member_p && (TREE_CODE (decl) != TYPE_DECL
@@ -335,7 +335,7 @@  make_friend_class (tree type, tree friend_type, bo
 		{
 		  error ("%qT is not a nested class of %qT",
 			 name, ctype);
-		  error ("%q+D declared here", decl);
+		  inform (input_location, "%q+D declared here", decl);
 		  return;
 		}
 
Index: cp/semantics.c
===================================================================
--- cp/semantics.c	(revision 201661)
+++ cp/semantics.c	(working copy)
@@ -3131,7 +3131,7 @@  finish_id_expression (tree id_expression,
 	      error (VAR_P (decl)
 		     ? G_("use of local variable with automatic storage from containing function")
 		     : G_("use of parameter from containing function"));
-	      error ("  %q+#D declared here", decl);
+	      inform (input_location, "%q+#D declared here", decl);
 	      return error_mark_node;
 	    }
 	}
Index: testsuite/g++.dg/cpp0x/constexpr-function2.C
===================================================================
--- testsuite/g++.dg/cpp0x/constexpr-function2.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/constexpr-function2.C	(working copy)
@@ -38,7 +38,7 @@  constexpr int g(int x, int n) // error: body not j
 } // { dg-error "not a return-statement" }
 
 constexpr int
-bar(int x, int y) { return x + y + x * y; } // { dg-error "previously" }
+bar(int x, int y) { return x + y + x * y; } // { dg-message "previously" }
 
 int bar(int x, int y)	     // { dg-error "redefinition" }
 { return x * 2 + 3 * y; }
Index: testsuite/g++.dg/cpp0x/constexpr-neg1.C
===================================================================
--- testsuite/g++.dg/cpp0x/constexpr-neg1.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/constexpr-neg1.C	(working copy)
@@ -50,7 +50,7 @@  class debug_flag {
   bool flag;
 };
 // OK
-constexpr int bar(int x, int y) // { dg-error "previously defined here" }
+constexpr int bar(int x, int y) // { dg-message "previously defined here" }
 { return x + y + x*y; }
 // ...
 // error: redefinition of bar
Index: testsuite/g++.dg/cpp0x/defaulted2.C
===================================================================
--- testsuite/g++.dg/cpp0x/defaulted2.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/defaulted2.C	(working copy)
@@ -6,13 +6,13 @@  void f() = delete;		// { dg-error "deleted" }
 
 struct A
 {
-  A() { }			// { dg-error "previous" }
+  A() { }			// { dg-message "previous" }
   void f() = default;		// { dg-error "default" }
 };
 
 A::A() = default;		// { dg-error "redefinition" }
 
-void g() {}			// { dg-error "previous" }
+void g() {}			// { dg-message "previous" }
 void g() = delete;		// { dg-error "redefinition" }
 
 struct B // { dg-message "user-provided default constructor" }
Index: testsuite/g++.dg/cpp0x/defaulted31.C
===================================================================
--- testsuite/g++.dg/cpp0x/defaulted31.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/defaulted31.C	(working copy)
@@ -3,7 +3,7 @@ 
 
 struct A
 {
-  A() { }			// { dg-error "defined" }
+  A() { }			// { dg-message "defined" }
   ~A() = default;		// { dg-error "defaulted" }
 };
 
Index: testsuite/g++.dg/cpp0x/error6.C
===================================================================
--- testsuite/g++.dg/cpp0x/error6.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/error6.C	(working copy)
@@ -2,7 +2,7 @@ 
 // { dg-options -std=c++0x }
 
 template<typename C>
-auto g(C& c) -> decltype (c.f()) { return c.f(); } // { dg-error "decltype .c\\.f" }
+auto g(C& c) -> decltype (c.f()) { return c.f(); } // { dg-message "decltype .c\\.f" }
 
 template<typename C>
 auto g(C& c) -> decltype (c.f()) { return c.f(); } // { dg-error "decltype .c\\.f" }
Index: testsuite/g++.dg/cpp0x/gen-attrs-32.C
===================================================================
--- testsuite/g++.dg/cpp0x/gen-attrs-32.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/gen-attrs-32.C	(working copy)
@@ -13,7 +13,7 @@  void bar()
 
 typedef union U1 { int i; } U2 [[gnu::transparent_union]]; // { dg-warning "ignored" }
 
-static void foo2(U1) {}		// { dg-error "previously defined" }
+static void foo2(U1) {}		// { dg-message "previously defined" }
 static void foo2(U2) {}		// { dg-error "redefinition" }
 
 void bar2(U1 u1, U2 u2)
Index: testsuite/g++.dg/cpp0x/override2.C
===================================================================
--- testsuite/g++.dg/cpp0x/override2.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/override2.C	(working copy)
@@ -44,7 +44,7 @@  int main()
   B2 final2 = final;
   struct B2 {}; // { dg-error "redefinition" }
   struct B2 final; // { dg-error "redeclaration" }
-  struct B2 override; // { dg-error "previously declared here" }
+  struct B2 override; // { dg-message "previously declared here" }
   struct B2 final {}; // { dg-error "redefinition" }
   struct B2 override {}; // { dg-error "cannot specify 'override' for a class" }
   B2 override{}; // { dg-error "redeclaration" }
Index: testsuite/g++.dg/cpp0x/parse1.C
===================================================================
--- testsuite/g++.dg/cpp0x/parse1.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/parse1.C	(working copy)
@@ -1,5 +1,5 @@ 
 // PR c++/43509
 // { dg-options "-std=c++0x" }
 
-typedef int B;			// { dg-error "" }
+typedef int B;			// { dg-message "" }
 B::B() {}			// { dg-error "" }
Index: testsuite/g++.dg/cpp0x/scoped_enum.C
===================================================================
--- testsuite/g++.dg/cpp0x/scoped_enum.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/scoped_enum.C	(working copy)
@@ -6,7 +6,7 @@  enum class Color1 {
 };
 
 enum struct Color2 {
-  Red, // { dg-error "previously declared here" }
+  Red, // { dg-message "previously declared here" }
   Orange,
   Yellow,
   Green,
Index: testsuite/g++.dg/cpp0x/temp_default4.C
===================================================================
--- testsuite/g++.dg/cpp0x/temp_default4.C	(revision 201661)
+++ testsuite/g++.dg/cpp0x/temp_default4.C	(working copy)
@@ -2,7 +2,7 @@ 
 
 class X {
   template<typename T = int> friend void f(X) { }
-  template<typename T> friend void g(X); // { dg-error "previously declared here" }
+  template<typename T> friend void g(X); // { dg-message "previously declared here" }
   template<typename T = int> friend void h(X); // { dg-error "function template friend" }
 };
 
Index: testsuite/g++.dg/ext/attrib32.C
===================================================================
--- testsuite/g++.dg/ext/attrib32.C	(revision 201663)
+++ testsuite/g++.dg/ext/attrib32.C	(working copy)
@@ -12,7 +12,7 @@  void bar()
 
 typedef union U1 { int i; } U2 __attribute__((transparent_union)); // { dg-warning "ignored" }
 
-static void foo2(U1) {}		// { dg-error "previously defined" }
+static void foo2(U1) {}		// { dg-message "previously defined" }
 static void foo2(U2) {}		// { dg-error "redefinition" }
 
 void bar2(U1 u1, U2 u2)
Index: testsuite/g++.dg/ext/gnu-inline-global-reject.C
===================================================================
--- testsuite/g++.dg/ext/gnu-inline-global-reject.C	(revision 201663)
+++ testsuite/g++.dg/ext/gnu-inline-global-reject.C	(working copy)
@@ -10,47 +10,47 @@ 
 
 #undef fn
 #define fn pfx(func_decl_inline_before)
-decl(inline, fn) // { dg-error "previous" "" }
+decl(inline, fn) // { dg-message "previous" "" }
 gnuindef(fn, 0) // { dg-error "redeclared" "" }
 
 #undef fn
 #define fn pfx(func_decl_inline_after)
-gnuindef(fn, 0) // { dg-error "previous" "" }
+gnuindef(fn, 0) // { dg-message "previous" "" }
 decl(inline, fn) // { dg-error "redeclared" "" }
 
 #undef fn
 #define fn pfx(func_def_gnuin_redef)
-gnuindef(fn, 0) // { dg-error "previous" "" }
+gnuindef(fn, 0) // { dg-message "previous" "" }
 gnuindef(fn, 1) // { dg-error "redefinition" "" }
 
 #undef fn
 #define fn pfx(func_def_inline_redef)
-def(inline, fn, 0) // { dg-error "previous" "" }
+def(inline, fn, 0) // { dg-message "previous" "" }
 def(inline, fn, 1) // { dg-error "redefinition" "" }
 
 #undef fn
 #define fn pfx(func_def_inline_after)
-gnuindef(fn, 0) // { dg-error "previous" "" }
+gnuindef(fn, 0) // { dg-message "previous" "" }
 def(inline, fn, 1) // { dg-error "redeclare" "" }
 
 #undef fn
 #define fn pfx(func_def_inline_before)
-def(inline, fn, 0) // { dg-error "previous" "" }
+def(inline, fn, 0) // { dg-message "previous" "" }
 gnuindef(fn, 1) // { dg-error "redefinition" "" }
 
 #undef fn
 #define fn pfx(func_def_before)
-def(, fn, 0) // { dg-error "previous" "" }
+def(, fn, 0) // { dg-message "previous" "" }
 gnuindef(fn, 1) // { dg-error "redefinition" "" }
 
 #undef fn
 #define fn pfx(func_decl_static_inline_before)
-decl(static inline, fn) // { dg-error "previous" "" }
+decl(static inline, fn) // { dg-message "previous" "" }
 gnuindef(fn, 0) // { dg-error "redeclared" "" }
 
 #undef fn
 #define fn pfx(func_def_static_inline_after)
 decl(static, fn)
-gnuindef(fn, 0) // { dg-error "previous" "" }
+gnuindef(fn, 0) // { dg-message "previous" "" }
 decl(static, fn)
 def(static inline, fn, 1) // { dg-error "redeclare" "" }
Index: testsuite/g++.dg/ext/mv13.C
===================================================================
--- testsuite/g++.dg/ext/mv13.C	(revision 201663)
+++ testsuite/g++.dg/ext/mv13.C	(working copy)
@@ -5,7 +5,7 @@ 
 
 extern "C"
 __attribute__ ((target ("default")))
-int foo ()  // { dg-error "previously defined here" }
+int foo ()  // { dg-message "previously defined here" }
 {
   return 0;
 }
Index: testsuite/g++.dg/ext/mv7.C
===================================================================
--- testsuite/g++.dg/ext/mv7.C	(revision 201663)
+++ testsuite/g++.dg/ext/mv7.C	(working copy)
@@ -2,7 +2,7 @@ 
 // { dg-options "" }
 
 __attribute__((target ("default")))
-void foo (void)	// { dg-error "previously defined here" }
+void foo (void)	// { dg-message "previously defined here" }
 {
 }
 
Index: testsuite/g++.dg/ext/mv9.C
===================================================================
--- testsuite/g++.dg/ext/mv9.C	(revision 201663)
+++ testsuite/g++.dg/ext/mv9.C	(working copy)
@@ -3,7 +3,7 @@ 
 
 void foo ();
 void foo () __attribute__((target ("sse4")));
-void foo () __attribute__((target ("default"))); // { dg-error "previous declaration" }
+void foo () __attribute__((target ("default"))); // { dg-message "previous declaration" }
 void foo ()	// { dg-error "attribute for multi-versioned" }
 {
 }
Index: testsuite/g++.dg/ext/pr57362.C
===================================================================
--- testsuite/g++.dg/ext/pr57362.C	(working copy)
+++ testsuite/g++.dg/ext/pr57362.C	(working copy)
@@ -193,7 +193,6 @@  int foo(void) { return 1; }
     }
 
 /* { dg-prune-output "attribute.* is unknown" } */
-/* { dg-prune-output "redefinition of int foo" } */
-/* { dg-prune-output "previous declaration of int foo" } */
-/* { dg-prune-output "int foo.* previously defined here" } */
+/* { dg-prune-output "missing 'target' attribute*" } */
+/* { dg-prune-output "redefinition of 'int foo" } */
 /* { dg-prune-output "No dispatcher found for" } */
Index: testsuite/g++.dg/ext/typeof10.C
===================================================================
--- testsuite/g++.dg/ext/typeof10.C	(revision 201663)
+++ testsuite/g++.dg/ext/typeof10.C	(working copy)
@@ -5,7 +5,7 @@  template<int> struct A
 {
   void foo()
   {
-    typedef int T;                // { dg-error "previous" }
+    typedef int T;                // { dg-message "previous" }
     typedef __typeof__(*this) T;  // { dg-error "conflicting" }
   }
 };
Index: testsuite/g++.dg/lookup/anon6.C
===================================================================
--- testsuite/g++.dg/lookup/anon6.C	(revision 201661)
+++ testsuite/g++.dg/lookup/anon6.C	(working copy)
@@ -1,11 +1,11 @@ 
-extern int v1; // { dg-error "declared" }
+extern int v1; // { dg-message "declared" }
 static union { int v1; }; // { dg-error "redeclaration" } 
 
-static union { int v2; }; // { dg-error "declared" }
+static union { int v2; }; // { dg-message "declared" }
 extern int v2; // { dg-error "redeclaration" } 
 
-int v3; // { dg-error "declared" }
+int v3; // { dg-message "declared" }
 static union { int v3; }; // { dg-error "redeclaration" } 
 
-static union { int v4; }; // { dg-error "declared" }
+static union { int v4; }; // { dg-message "declared" }
 static union { int v4; }; // { dg-error "redeclaration" } 
Index: testsuite/g++.dg/lookup/crash6.C
===================================================================
--- testsuite/g++.dg/lookup/crash6.C	(revision 201661)
+++ testsuite/g++.dg/lookup/crash6.C	(working copy)
@@ -4,5 +4,5 @@ 
 
 // PR c++/18652: ICE redeclaring variable as template.
 
-int A;			// { dg-error "previous declaration" }
+int A;			// { dg-message "previous declaration" }
 template<int> struct A; // { dg-error "different kind of symbol" }
Index: testsuite/g++.dg/lookup/name-clash5.C
===================================================================
--- testsuite/g++.dg/lookup/name-clash5.C	(revision 201661)
+++ testsuite/g++.dg/lookup/name-clash5.C	(working copy)
@@ -7,7 +7,7 @@ 
 // declarative region (7.3.2, clause 14). ]"
 
 namespace N
-{ // { dg-error "previous declaration" }
+{ // { dg-message "previous declaration" }
 }
 
 class N; // { dg-error "redeclared" }
Index: testsuite/g++.dg/lookup/name-clash6.C
===================================================================
--- testsuite/g++.dg/lookup/name-clash6.C	(revision 201661)
+++ testsuite/g++.dg/lookup/name-clash6.C	(working copy)
@@ -6,7 +6,7 @@ 
 // "[Note: a namespace name or a class template name must be unique in its
 // declarative region (7.3.2, clause 14). ]"
 
-class N; // { dg-error "previous declaration" }
+class N; // { dg-message "previous declaration" }
 
 namespace N
 { // { dg-error "redeclared" }
Index: testsuite/g++.dg/other/anon4.C
===================================================================
--- testsuite/g++.dg/other/anon4.C	(revision 201661)
+++ testsuite/g++.dg/other/anon4.C	(working copy)
@@ -3,6 +3,6 @@ 
 
 void foo()
 {
-    int i;             // { dg-error "previously" }
+    int i;             // { dg-message "previously" }
     union { int i; };  // { dg-error "redeclaration" }
 }
Index: testsuite/g++.dg/other/error15.C
===================================================================
--- testsuite/g++.dg/other/error15.C	(revision 201661)
+++ testsuite/g++.dg/other/error15.C	(working copy)
@@ -3,39 +3,39 @@ 
 extern void g0 (int a, int b);
 extern void g1 (int a, float b);
 
-extern void f0 (int a,		// { dg-error "previous" }
+extern void f0 (int a,		// { dg-message "previous" }
                 int a);		// { dg-error "redefinition" }
-extern void f1 (int a,		// { dg-error "previous" }
+extern void f1 (int a,		// { dg-message "previous" }
                 float a);	// { dg-error "conflicting" }
-extern void f3 (int a, int b, int c, // { dg-error "previous" }
+extern void f3 (int a, int b, int c, // { dg-message "previous" }
                 int a);		// { dg-error "redefinition" }
-extern void f4 (int a, int b, int c, // { dg-error "previous" }
+extern void f4 (int a, int b, int c, // { dg-message "previous" }
                 int a,		     // { dg-error "redefinition" }
                 int a);		     // { dg-error "redefinition" }
-extern void f5 (int a, int b, int c, int d, int e, int f, int g, int h, // { dg-error "previous" }
+extern void f5 (int a, int b, int c, int d, int e, int f, int g, int h, // { dg-message "previous" }
                 int a,							// { dg-error "redefinition" }
                 int i, int j, int k, int l, int m, int n, int o, int p,
                 int q, int r, int s, int t, int u, int v, int w, int x, int y,
                 int z);
 
-extern void f6 (int a, int, int, int, int, int, int, int, int, int, int, // { dg-error "previous" }
+extern void f6 (int a, int, int, int, int, int, int, int, int, int, int, // { dg-message "previous" }
                 int a,		// { dg-error "redefinition" }
                 int, int, int, int, int, int, int, int, int, int, int,
                 float, float, float, float, float, float, float, float,
                 int);
 
-extern void f7 (void (*a)(int),	  // { dg-error "previous" }
+extern void f7 (void (*a)(int),	  // { dg-message "previous" }
                 void (*a)(int));  // { dg-error "redefinition" }
-extern void f8 (float (*a)(int),  // { dg-error "previous" }
+extern void f8 (float (*a)(int),  // { dg-message "previous" }
                 int (*a)(float));  // { dg-error "conflicting" }
 
-extern void f9 (int a,		// { dg-error "previous" }
+extern void f9 (int a,		// { dg-message "previous" }
                 int a,		// { dg-error "redefinition" }
                 int a);		// { dg-error "redefinition" }
 
-extern void f10 (int a,		// { dg-error "previous" }
-                 int b,		// { dg-error "previous" }
-                 int c,		// { dg-error "previous" }
+extern void f10 (int a,		// { dg-message "previous" }
+                 int b,		// { dg-message "previous" }
+                 int c,		// { dg-message "previous" }
                  int c,		// { dg-error "redefinition" }
                  int b,		// { dg-error "redefinition" }
                  int a);	// { dg-error "redefinition" }
@@ -43,7 +43,7 @@  extern void g1 (int a, float b);
 class C1 {
  public:
   void C1_g0 (int a, int b);
-  void C1_f0 (int a,		// { dg-error "previous" }
+  void C1_f0 (int a,		// { dg-message "previous" }
               int a);		// { dg-error "redefinition" }
 };
 
@@ -51,6 +51,6 @@  template <class T>
 class C2 {
  public:
   void C2_g0 (T a, T b);
-  void C2_f0 (T a,		// { dg-error "previous" }
+  void C2_f0 (T a,		// { dg-message "previous" }
               T a);		// { dg-error "redefinition" }
 };
Index: testsuite/g++.dg/other/error8.C
===================================================================
--- testsuite/g++.dg/other/error8.C	(revision 201661)
+++ testsuite/g++.dg/other/error8.C	(working copy)
@@ -5,7 +5,7 @@ 
 
 void foo(void)
 {
-  union { int alpha; int beta; }; // { dg-error "previous declaration" }
+  union { int alpha; int beta; }; // { dg-message "previous declaration" }
   double alpha;  // { dg-error "conflicting declaration" }
 }
 
Index: testsuite/g++.dg/other/redecl2.C
===================================================================
--- testsuite/g++.dg/other/redecl2.C	(revision 201661)
+++ testsuite/g++.dg/other/redecl2.C	(working copy)
@@ -7,5 +7,5 @@  struct S {
   virtual int foo() = 0;
 };
  
-int S::foo() { return 0; } // { dg-error "defined here" }
+int S::foo() { return 0; } // { dg-message "defined here" }
 int S::foo() { return 0; } // { dg-error "redefinition" }
Index: testsuite/g++.dg/parse/crash16.C
===================================================================
--- testsuite/g++.dg/parse/crash16.C	(revision 201661)
+++ testsuite/g++.dg/parse/crash16.C	(working copy)
@@ -1,7 +1,7 @@ 
 // PR c++/16971
 
 namespace N {
-  int i; // { dg-error "" }
+  int i; // { dg-message "" }
   // By checking for an explicit keyword on the next line we avoid
   // matching an ICE message.
   int i; // { dg-error "redefinition" }
Index: testsuite/g++.dg/parse/crash21.C
===================================================================
--- testsuite/g++.dg/parse/crash21.C	(revision 201661)
+++ testsuite/g++.dg/parse/crash21.C	(working copy)
@@ -1,6 +1,6 @@ 
 namespace N
 {
-  struct A; // { dg-error "previous declaration" "" }
+  struct A; // { dg-message "previous declaration" "" }
 }
 
 template<int I>
Index: testsuite/g++.dg/parse/crash38.C
===================================================================
--- testsuite/g++.dg/parse/crash38.C	(revision 201661)
+++ testsuite/g++.dg/parse/crash38.C	(working copy)
@@ -1,11 +1,11 @@ 
 /* PR c++/33207  */
 
 /* This would not ICE.  */
-namespace M { } /* { dg-error "previous declaration" } */
+namespace M { } /* { dg-message "previous declaration" } */
 struct M; /* { dg-error "redeclared as different kind of symbol" } */
 M *p; /* { dg-error "does not name a type" } */
 
 /* This would ICE when processing 'p'.  */
-namespace N { } /* { dg-error "previous declaration" } */
+namespace N { } /* { dg-message "previous declaration" } */
 struct N; /* { dg-error "redeclared as different kind of symbol" } */
 struct N* p; /* { dg-error "redeclared as different kind of symbol|invalid type" } */
Index: testsuite/g++.dg/parse/redef2.C
===================================================================
--- testsuite/g++.dg/parse/redef2.C	(revision 201661)
+++ testsuite/g++.dg/parse/redef2.C	(working copy)
@@ -1,6 +1,6 @@ 
 // { dg-do compile }
 
-char * d [10];  // { dg-error "8: 'd' has a previous declaration as" }
+char * d [10];  // { dg-message "8: 'd' has a previous declaration as" }
 char e [15][10];
 int (*f)();
 
Index: testsuite/g++.dg/parse/struct-as-enum1.C
===================================================================
--- testsuite/g++.dg/parse/struct-as-enum1.C	(revision 201661)
+++ testsuite/g++.dg/parse/struct-as-enum1.C	(working copy)
@@ -4,7 +4,7 @@ 
 
 namespace N
 {
-    struct A {};	// { dg-error "previous declaration" }
+    struct A {};	// { dg-message "previous declaration" }
 }
 
 typedef enum N::A B;	// { dg-error "enum|invalid type" }
Index: testsuite/g++.dg/template/crash39.C
===================================================================
--- testsuite/g++.dg/template/crash39.C	(revision 201661)
+++ testsuite/g++.dg/template/crash39.C	(working copy)
@@ -1,6 +1,6 @@ 
 // PR c++/22405
 
-template <typename T> void foo(T &arg) { // { dg-error "declared" }
+template <typename T> void foo(T &arg) { // { dg-message "declared" }
   arg+=1;
 }
 
Index: testsuite/g++.dg/template/redecl3.C
===================================================================
--- testsuite/g++.dg/template/redecl3.C	(revision 201661)
+++ testsuite/g++.dg/template/redecl3.C	(working copy)
@@ -3,5 +3,5 @@ 
 
 // { dg-do compile }
 
-int foo;                    // { dg-error "previous declaration" }
+int foo;                    // { dg-message "previous declaration" }
 template<int> void foo() {} // { dg-error "redeclared" }
Index: testsuite/g++.dg/tls/diag-3.C
===================================================================
--- testsuite/g++.dg/tls/diag-3.C	(revision 201661)
+++ testsuite/g++.dg/tls/diag-3.C	(working copy)
@@ -1,10 +1,10 @@ 
 // Report invalid extern and __thread combinations.
 // { dg-require-effective-target tls }
 
-extern int j;		// { dg-error "previously declared here" }
+extern int j;		// { dg-message "previously declared here" }
 __thread int j;		// { dg-error "follows non-thread-local" }
 
-extern __thread int i;	// { dg-error "previously declared here" }
+extern __thread int i;	// { dg-message "previously declared here" }
 int i;			// { dg-error "follows thread-local" }
 
 extern __thread int k;	// This is fine.
Index: testsuite/g++.dg/warn/Wredundant-decls-spec.C
===================================================================
--- testsuite/g++.dg/warn/Wredundant-decls-spec.C	(revision 201661)
+++ testsuite/g++.dg/warn/Wredundant-decls-spec.C	(working copy)
@@ -8,5 +8,5 @@  template <typename T> struct S
 
 template<> void S<int>::foo();
 
-template<> void S<double>::foo();  // { dg-warning "previous declaration" }
+template<> void S<double>::foo();  // { dg-message "previous declaration" }
 template<> void S<double>::foo();  // { dg-warning "redundant redeclaration" }
Index: testsuite/g++.old-deja/g++.benjamin/typedef01.C
===================================================================
--- testsuite/g++.old-deja/g++.benjamin/typedef01.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.benjamin/typedef01.C	(working copy)
@@ -16,7 +16,7 @@  typedef int I;
 typedef I I;
 
 //p3--cannot redefine to a different type in a given scope
-class complex2 { /* ... */ };// { dg-error "" } .*
+class complex2 { /* ... */ };// { dg-message "" } .*
 typedef int complex2;// { dg-error "" } .*
 typedef int complex3;// { dg-message "" } .*
 class complex3 { /* ... */ };// { dg-error "" } .*
Index: testsuite/g++.old-deja/g++.benjamin/warn02.C
===================================================================
--- testsuite/g++.old-deja/g++.benjamin/warn02.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.benjamin/warn02.C	(working copy)
@@ -44,11 +44,5 @@  class E
   int b;
 };
 
+extern int foo3(const char *);  // { dg-message "" } 
 extern int foo3(const char *);  // { dg-warning "" } 
-extern int foo3(const char *);  // { dg-warning "" } 
-
-
-
-
-
-
Index: testsuite/g++.old-deja/g++.brendan/crash16.C
===================================================================
--- testsuite/g++.old-deja/g++.brendan/crash16.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.brendan/crash16.C	(working copy)
@@ -5,7 +5,7 @@ 
 class Graph { // { dg-error "1:new types|1: note: \\(perhaps" }
 public:
       unsigned         char N;
-      Graph(void) {} // { dg-error "7:'Graph" }
+      Graph(void) {} // { dg-message "7:'Graph" }
 }
 
 Graph::Graph(void) // { dg-error "18:return type|1: error: redefinition" }
Index: testsuite/g++.old-deja/g++.brendan/crash18.C
===================================================================
--- testsuite/g++.old-deja/g++.brendan/crash18.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.brendan/crash18.C	(working copy)
@@ -7,7 +7,7 @@  class Pix {
     Pix(const Pix&);
 
     // Friend functions so that v == x works as does x == v works
-    friend int operator==(void *v, const Pix& x) // { dg-error "previously" }
+    friend int operator==(void *v, const Pix& x) // { dg-message "previously" }
     { return v == index; }  // { dg-error "from this location" }
     // ??? should be operator!=
     friend int operator==(void *v, const Pix& x) // { dg-error "redefinition" }
Index: testsuite/g++.old-deja/g++.brendan/err-msg4.C
===================================================================
--- testsuite/g++.old-deja/g++.brendan/err-msg4.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.brendan/err-msg4.C	(working copy)
@@ -2,8 +2,8 @@ 
 // GROUPS passed error-messages
 class X {
 public:
-    static int x;// { dg-error "" }  previous.*
-    static int y;// { dg-error "" }  previous.*
+    static int x;// { dg-message "" }  previous.*
+    static int y;// { dg-message "" }  previous.*
 };
 
 unsigned X::x;// { dg-error "" }  conflict.*
Index: testsuite/g++.old-deja/g++.brendan/redecl1.C
===================================================================
--- testsuite/g++.old-deja/g++.brendan/redecl1.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.brendan/redecl1.C	(working copy)
@@ -1,5 +1,5 @@ 
 // { dg-do assemble }
 // GROUPS passed redeclaration
-inline int min(int x, int y) {return x < y ? x : y;}	/* 235 */// { dg-error "" } .*
+inline int min(int x, int y) {return x < y ? x : y;}	/* 235 */// { dg-message "" } .*
 int min(int a, int b);
 inline int min(int a, int b) {return (a < b)?a:b;}// { dg-error "" } .*
Index: testsuite/g++.old-deja/g++.brendan/static3.C
===================================================================
--- testsuite/g++.old-deja/g++.brendan/static3.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.brendan/static3.C	(working copy)
@@ -3,7 +3,7 @@ 
 class foo{
 public:
   static void  bar( int i ){ value = i; }
-  static int  value;// { dg-error "" } .*
+  static int  value;// { dg-message "" } .*
 };
 
 const int  foo::value = 0; // should be an error.// { dg-error "" } .*
Index: testsuite/g++.old-deja/g++.bugs/900127_02.C
===================================================================
--- testsuite/g++.old-deja/g++.bugs/900127_02.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.bugs/900127_02.C	(working copy)
@@ -16,10 +16,10 @@ 
 
 // keywords: name spaces, overloading
 
-int global0;			// { dg-error "" } 
+int global0;			// { dg-message "" } 
 int global0 ();			// { dg-error "" } 
 
-int global1 ();			// { dg-error "" } xref for below
+int global1 ();			// { dg-message "" } xref for below
 int global1;			// { dg-error "" } caught
 
 struct struct_0 {
@@ -34,13 +34,13 @@  struct struct_1 {
 
 void function_0 ()
 {
-	int function_0_local;	// { dg-error "" } 
+	int function_0_local;	// { dg-message "" } 
 	extern int function_0_local ();	// { dg-error "" } 
 }
 
 void function_1 ()
 {
-	int function_1_local ();        // { dg-error "" } 
+	int function_1_local ();        // { dg-message "" } 
 	extern int function_1_local;	// { dg-error "" } 
 }
 
Index: testsuite/g++.old-deja/g++.jason/binding.C
===================================================================
--- testsuite/g++.old-deja/g++.jason/binding.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.jason/binding.C	(working copy)
@@ -6,7 +6,7 @@  struct T { ~T(); };
 int main()
 {
   foo:
-   T t;				// { dg-error "" } redeclared
+   T t;				// { dg-message "" } redeclared
   bar:
    T t;				// { dg-error "" } redeclaration
 }
Index: testsuite/g++.old-deja/g++.jason/crash4.C
===================================================================
--- testsuite/g++.old-deja/g++.jason/crash4.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.jason/crash4.C	(working copy)
@@ -16,7 +16,7 @@  class cc_Array : public ccObjectInfo
 };
 
 template <class T>
-const ccObjectInfo& cc_Array<T>::repInvariant(int) const  // { dg-error "previously declared" }
+const ccObjectInfo& cc_Array<T>::repInvariant(int) const  // { dg-message "previously declared" }
 {  return *this /* *this is required here */; }
 
 template <class T>
Index: testsuite/g++.old-deja/g++.jason/crash7.C
===================================================================
--- testsuite/g++.old-deja/g++.jason/crash7.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.jason/crash7.C	(working copy)
@@ -1,6 +1,6 @@ 
 // { dg-do assemble  }
 // Bug: g++ can't deal.
 
-typedef unsigned size_t;	// { dg-error "" } previous declaration
+typedef unsigned size_t;	// { dg-message "" } previous declaration
 typedef unsigned long size_t;	// { dg-error "" } redefining size_t
 void f (size_t);		// causes compiler segfault - 
Index: testsuite/g++.old-deja/g++.jason/lineno.C
===================================================================
--- testsuite/g++.old-deja/g++.jason/lineno.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.jason/lineno.C	(working copy)
@@ -1,6 +1,6 @@ 
 // { dg-do assemble  }
 // Bug; g++ binds a function definition to the line number of a later decl.
 
-void foo () { }			// { dg-error "" } redeclared
+void foo () { }			// { dg-message "" } redeclared
 void foo ();			// { dg-bogus "" } invalid binding
 void foo () { }			// { dg-error "" } redeclared
Index: testsuite/g++.old-deja/g++.jason/scoping7.C
===================================================================
--- testsuite/g++.old-deja/g++.jason/scoping7.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.jason/scoping7.C	(working copy)
@@ -2,5 +2,5 @@ 
 // Bug: g++ doesn't flag name collisions between types and non-types as
 // errors.  It shouldn't for class names, but it should for typedefs.
 
-int bar;			// { dg-error "" } 
+int bar;			// { dg-message "" } 
 typedef int bar;		// { dg-error "" } 
Index: testsuite/g++.old-deja/g++.mike/misc3.C
===================================================================
--- testsuite/g++.old-deja/g++.mike/misc3.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.mike/misc3.C	(working copy)
@@ -1,4 +1,4 @@ 
 // { dg-do assemble  }
 // GROUPS uncaught
+int a;// { dg-message "" } .*
 int a;// { dg-error "" } .*
-int a;// { dg-error "" } .*
Index: testsuite/g++.old-deja/g++.mike/net44.C
===================================================================
--- testsuite/g++.old-deja/g++.mike/net44.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.mike/net44.C	(working copy)
@@ -1,7 +1,7 @@ 
 // { dg-do assemble  }
 // Make sure we don't dump core
 
-enum request { q, w, e};		// { dg-error "" } 
+enum request { q, w, e};		// { dg-message "" } 
 
 class request {				// { dg-error "" } 
 public:
Index: testsuite/g++.old-deja/g++.mike/ns3.C
===================================================================
--- testsuite/g++.old-deja/g++.mike/ns3.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.mike/ns3.C	(working copy)
@@ -1,5 +1,5 @@ 
 // { dg-do assemble  }
-int i;		// { dg-error "" } 
+int i;		// { dg-message "" } 
 
 namespace i {	// { dg-error "" } 
 }
Index: testsuite/g++.old-deja/g++.ns/alias4.C
===================================================================
--- testsuite/g++.old-deja/g++.ns/alias4.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.ns/alias4.C	(working copy)
@@ -7,7 +7,7 @@  namespace D {     // { dg-error "" } reopening nam
   void f();
 }
 
-void C::f(){}     // { dg-error "" } previous definition
+void C::f(){}     // { dg-message "" } previous definition
 
 void D::f(){}     // { dg-error "" } redefinition
 
Index: testsuite/g++.old-deja/g++.ns/ns11.C
===================================================================
--- testsuite/g++.old-deja/g++.ns/ns11.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.ns/ns11.C	(working copy)
@@ -5,7 +5,7 @@ 
 namespace A{
   void f(int);
   void f(int,int);
-  int i;              // { dg-error "" } .*
+  int i;              // { dg-message "" } .*
 }
 
 void A::f(){}         // { dg-error "" } should have been declared before
Index: testsuite/g++.old-deja/g++.other/crash23.C
===================================================================
--- testsuite/g++.old-deja/g++.other/crash23.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.other/crash23.C	(working copy)
@@ -2,6 +2,6 @@ 
 // Origin: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
 
 class T;
-inline void operator<(T&, T&) { } // { dg-error "" }  previous definition
+inline void operator<(T&, T&) { } // { dg-message "" }  previous definition
 inline void operator<(T&, T&) { } // { dg-error "" } duplicate definition
 
Index: testsuite/g++.old-deja/g++.other/decl8.C
===================================================================
--- testsuite/g++.old-deja/g++.other/decl8.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.other/decl8.C	(working copy)
@@ -3,7 +3,7 @@ 
 
 void foo(void)
 {
-  extern int i;    // { dg-error "" } previous declaration
+  extern int i;    // { dg-message "" } previous declaration
   extern double i; // { dg-error "" } conflicting type
   extern int j;
   extern int j;
Index: testsuite/g++.old-deja/g++.other/linkage3.C
===================================================================
--- testsuite/g++.old-deja/g++.other/linkage3.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.other/linkage3.C	(working copy)
@@ -1,5 +1,5 @@ 
 // { dg-do assemble  }
 // Origin: Mark Mitchell <mark@codesourcery.com>
 
-extern "C" void f (); // { dg-error "" } previous declaration
+extern "C" void f (); // { dg-message "" } previous declaration
 static void f () {} // { dg-error "" } extern redeclared static
Index: testsuite/g++.old-deja/g++.other/typeck1.C
===================================================================
--- testsuite/g++.old-deja/g++.other/typeck1.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.other/typeck1.C	(working copy)
@@ -4,7 +4,7 @@  extern int a[][];   // { dg-error "" } invalid mul
 extern int b[7][];  // { dg-error "" } invalid multidimensional array
 extern int c[][7];  // OK
 
-extern int (*i)[];  // { dg-error "" } previous declaration
+extern int (*i)[];  // { dg-message "" } previous declaration
 extern int (*i)[7]; // { dg-error "" } conflicting types for `i'
 
 extern int m[];
Index: testsuite/g++.old-deja/g++.other/typedef5.C
===================================================================
--- testsuite/g++.old-deja/g++.other/typedef5.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.other/typedef5.C	(working copy)
@@ -10,7 +10,7 @@  typedef int t;
 typedef t* u;
 typedef u v;
 typedef v* (*w)(t const); // this is ok
-typedef v* (*w)(t); // { dg-error "" } covers message `previously declared here'
+typedef v* (*w)(t); // { dg-message "" } covers message `previously declared here'
 typedef v* (*const w)(t); // { dg-error "" } invalid redeclaration
 typedef v const* (*w)(t); // { dg-error "" } invalid redeclaration
 typedef v* const (*w)(t); // { dg-error "" } invalid redeclaration
Index: testsuite/g++.old-deja/g++.pt/explicit34.C
===================================================================
--- testsuite/g++.old-deja/g++.pt/explicit34.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.pt/explicit34.C	(working copy)
@@ -5,7 +5,7 @@  template <class T>
 void foo(T t);
 
 template <>
-void foo(int) {}; // { dg-error "6:previously declared here" }
+void foo(int) {}; // { dg-message "6:previously declared here" }
 
 template <>
 void foo<int>(int) {} // { dg-error "6:redefinition" }
Index: testsuite/g++.old-deja/g++.pt/friend36.C
===================================================================
--- testsuite/g++.old-deja/g++.pt/friend36.C	(revision 201661)
+++ testsuite/g++.old-deja/g++.pt/friend36.C	(working copy)
@@ -1,7 +1,7 @@ 
 // { dg-do assemble  }
 
 template <class T>
-void f(T) {} // { dg-error "previously" }
+void f(T) {} // { dg-message "previously" }
 
 template <class U>
 struct S {
Index: testsuite/obj-c++.dg/method-8.mm
===================================================================
--- testsuite/obj-c++.dg/method-8.mm	(revision 201661)
+++ testsuite/obj-c++.dg/method-8.mm	(working copy)
@@ -16,7 +16,7 @@ 
 @end
 
 @implementation class3
-- (int) meth1 { return 0; } /* { dg-error "previously defined here" } */
+- (int) meth1 { return 0; } /* { dg-message "previously defined here" } */
 - (int) meth1 { return 0; } /* { dg-error "redefinition of" } */
 @end
 
@@ -25,6 +25,6 @@ 
 @end
 
 @implementation class4
-+ (void) meth1 {} /* { dg-error "previously defined here" } */
++ (void) meth1 {} /* { dg-message "previously defined here" } */
 + (void) meth1 {} /* { dg-error "redefinition of" } */
 @end
Index: testsuite/obj-c++.dg/tls/diag-3.mm
===================================================================
--- testsuite/obj-c++.dg/tls/diag-3.mm	(revision 201661)
+++ testsuite/obj-c++.dg/tls/diag-3.mm	(working copy)
@@ -1,10 +1,10 @@ 
 /* Report invalid extern and __thread combinations. */
 /* { dg-require-effective-target tls } */
 
-extern int j;		/* { dg-error "previously declared here" } */
+extern int j;		/* { dg-message "previously declared here" } */
 __thread int j;		/* { dg-error "follows non-thread-local" } */
 
-extern __thread int i;	/* { dg-error "previously declared here" } */
+extern __thread int i;	/* { dg-message "previously declared here" } */
 int i;			/* { dg-error "follows thread-local" } */
 
 extern __thread int k;	/* This is fine. */