diff mbox

[C++] Use inform in 2 places

Message ID 5378D62E.7010705@oracle.com
State New
Headers show

Commit Message

Paolo Carlini May 18, 2014, 3:47 p.m. UTC
Hi,

while working on c++/58664 I noticed a couple of places where, IMHO, we 
should use inform. Tested x86_64-linux.

Thanks!
Paolo.

///////////////////////////
/cp
2014-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck2.c (cxx_incomplete_type_diagnostic): Use inform. 
	* parser.c (cp_parser_enum_specifier): Likewise.

/testsuite
2014-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* c-c++-common/gomp/simd4.c: Adjust for inform.
	* g++.dg/cpp0x/decltype-call1.C: Likewise.
	* g++.dg/cpp0x/forw_enum6.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-ice7.C: Likewise.
	* g++.dg/cpp0x/noexcept15.C: Likewise.
	* g++.dg/cpp0x/variadic-ex2.C: Likewise.
	* g++.dg/eh/spec6.C: Likewise.
	* g++.dg/expr/cast1.C: Likewise.
	* g++.dg/expr/dtor1.C: Likewise.
	* g++.dg/ext/is_base_of_diagnostic.C: Likewise.
	* g++.dg/ext/unary_trait_incomplete.C: Likewise.
	* g++.dg/gomp/pr49223-2.C: Likewise.
	* g++.dg/gomp/udr-4.C: Likewise.
	* g++.dg/init/delete1.C: Likewise.
	* g++.dg/other/crash-2.C: Likewise.
	* g++.dg/parse/crash24.C: Likewise.
	* g++.dg/parse/crash25.C: Likewise.
	* g++.dg/parse/crash31.C: Likewise.
	* g++.dg/parse/crash49.C: Likewise.
	* g++.dg/parse/crash50.C: Likewise.
	* g++.dg/parse/crash54.C: Likewise.
	* g++.dg/parse/dtor7.C: Likewise.
	* g++.dg/parse/error40.C: Likewise.
	* g++.dg/parse/fused-params1.C: Likewise.
	* g++.dg/parse/new1.C: Likewise.
	* g++.dg/template/crash35.C: Likewise.
	* g++.dg/template/crash59.C: Likewise.
	* g++.dg/template/crash77.C: Likewise.
	* g++.dg/template/error51.C: Likewise.
	* g++.dg/template/incomplete1.C: Likewise.
	* g++.dg/template/incomplete3.C: Likewise.
	* g++.dg/template/incomplete4.C: Likewise.
	* g++.dg/template/incomplete5.C: Likewise.
	* g++.dg/template/inherit8.C: Likewise.
	* g++.dg/template/instantiate1.C: Likewise.
	* g++.dg/template/instantiate3.C: Likewis: Likewise.
	* g++.dg/template/offsetof2.C: Likewise.
	* g++.dg/tm/pr51928.C: Likewise.
	* g++.dg/warn/Wdelete-incomplete-1.C: Likewise.
	* g++.dg/warn/incomplete1.C: Likewise.
	* g++.dg/warn/incomplete2.C: Likewise.
	* g++.old-deja/g++.brendan/friend4.C: Likewise.
	* g++.old-deja/g++.bugs/900121_01.C: Likewise.
	* g++.old-deja/g++.bugs/900214_01.C: Likewise.
	* g++.old-deja/g++.eh/catch1.C: Likewise.
	* g++.old-deja/g++.eh/spec6.C: Likewise.
	* g++.old-deja/g++.mike/p7868.C: Likewise.
	* g++.old-deja/g++.other/crash38.C: Likewise.
	* g++.old-deja/g++.other/enum2.C: Likewise.
	* g++.old-deja/g++.other/incomplete.C: Likewise.
	* g++.old-deja/g++.other/vaarg3.C: Likewise.
	* g++.old-deja/g++.pt/crash9.C: Likewise.
	* g++.old-deja/g++.pt/niklas01a.C: Likewise.
	* g++.old-deja/g++.pt/typename8.C: Likewise.
	* g++.old-deja/g++.robertl/ice990323-1.C: Likewise.

Comments

Jason Merrill May 19, 2014, 5:37 p.m. UTC | #1
OK.

Jason
diff mbox

Patch

Index: cp/typeck2.c
===================================================================
--- cp/typeck2.c	(revision 210579)
+++ cp/typeck2.c	(working copy)
@@ -438,7 +438,7 @@  void
 cxx_incomplete_type_diagnostic (const_tree value, const_tree type, 
 				diagnostic_t diag_kind)
 {
-  int decl = 0;
+  bool is_decl = false, complained = false;
 
   gcc_assert (diag_kind == DK_WARNING 
 	      || diag_kind == DK_PEDWARN 
@@ -452,10 +452,10 @@  cxx_incomplete_type_diagnostic (const_tree value,
 		     || TREE_CODE (value) == PARM_DECL
 		     || TREE_CODE (value) == FIELD_DECL))
     {
-      emit_diagnostic (diag_kind, input_location, 0,
-		       "%q+D has incomplete type", value);
-      decl = 1;
-    }
+      complained = emit_diagnostic (diag_kind, input_location, 0,
+				    "%q+D has incomplete type", value);
+      is_decl = true;
+    } 
  retry:
   /* We must print an error message.  Be clever about what it says.  */
 
@@ -464,15 +464,19 @@  cxx_incomplete_type_diagnostic (const_tree value,
     case RECORD_TYPE:
     case UNION_TYPE:
     case ENUMERAL_TYPE:
-      if (!decl)
-	emit_diagnostic (diag_kind, input_location, 0,
-			 "invalid use of incomplete type %q#T", type);
-      if (!TYPE_TEMPLATE_INFO (type))
-	emit_diagnostic (diag_kind, input_location, 0,
-			 "forward declaration of %q+#T", type);
-      else
-	emit_diagnostic (diag_kind, input_location, 0,
-			 "declaration of %q+#T", type);
+      if (!is_decl)
+	complained = emit_diagnostic (diag_kind, input_location, 0,
+				      "invalid use of incomplete type %q#T",
+				      type);
+      if (complained)
+	{
+      	  if (!TYPE_TEMPLATE_INFO (type))
+	    inform (DECL_SOURCE_LOCATION (TYPE_MAIN_DECL (type)),
+		    "forward declaration of %q#T", type);
+	  else
+	    inform (DECL_SOURCE_LOCATION (TYPE_MAIN_DECL (type)),
+		    "declaration of %q#T", type);
+	}
       break;
 
     case VOID_TYPE:
Index: cp/parser.c
===================================================================
--- cp/parser.c	(revision 210579)
+++ cp/parser.c	(working copy)
@@ -15540,9 +15540,10 @@  cp_parser_enum_specifier (cp_parser* parser)
 	}
       else
 	{
-	  error_at (type_start_token->location, "multiple definition of %q#T", type);
-	  error_at (DECL_SOURCE_LOCATION (TYPE_MAIN_DECL (type)),
-		    "previous definition here");
+	  error_at (type_start_token->location,
+		    "multiple definition of %q#T", type);
+	  inform (DECL_SOURCE_LOCATION (TYPE_MAIN_DECL (type)),
+		  "previous definition here");
 	  type = error_mark_node;
 	}
 
Index: testsuite/c-c++-common/gomp/simd4.c
===================================================================
--- testsuite/c-c++-common/gomp/simd4.c	(revision 210579)
+++ testsuite/c-c++-common/gomp/simd4.c	(working copy)
@@ -2,7 +2,7 @@ 
 /* { dg-options "-fopenmp" } */
 /* { dg-additional-options "-std=c99" { target c } } */
 
-struct S *p;	/* { dg-error "forward declaration" "" { target c++ } } */
+struct S *p;	/* { dg-message "forward declaration" "" { target c++ } } */
 float f;
 int j;
 
Index: testsuite/g++.dg/cpp0x/decltype-call1.C
===================================================================
--- testsuite/g++.dg/cpp0x/decltype-call1.C	(revision 210579)
+++ testsuite/g++.dg/cpp0x/decltype-call1.C	(working copy)
@@ -2,7 +2,7 @@ 
 // N3276
 // { dg-do compile { target c++11 } }
 
-struct A;			// { dg-error "forward declaration" }
+struct A;			// { dg-message "forward declaration" }
 A f();
 
 decltype(f()) g1();		 // OK
Index: testsuite/g++.dg/cpp0x/forw_enum6.C
===================================================================
--- testsuite/g++.dg/cpp0x/forw_enum6.C	(revision 210579)
+++ testsuite/g++.dg/cpp0x/forw_enum6.C	(working copy)
@@ -25,10 +25,10 @@  enum class E3 e3; // { dg-error "scoped enum must
 enum struct E3 e4; // { dg-error "scoped enum must not use" }
 enum E5 : int e5; // { dg-error "expected|invalid type" }
 
-enum E6 : int { a, b, c }; // { dg-error "previous definition" }
+enum E6 : int { a, b, c }; // { dg-message "previous definition" }
 enum E6 : int { a, b, c }; // { dg-error "multiple definition" }
 
-enum class E7 { }; // { dg-error "previous definition" }
+enum class E7 { }; // { dg-message "previous definition" }
 enum class E7 { a, b, c }; // { dg-error "multiple definition" }
 
 namespace N1
Index: testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C
===================================================================
--- testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C	(revision 210579)
+++ testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C	(working copy)
@@ -1,7 +1,7 @@ 
 // PR c++/52487
 // { dg-do compile { target c++11 } }
 
-struct A;         // { dg-error "forward declaration" }
+struct A;         // { dg-message "forward declaration" }
 
 void foo(A& a)
 {
Index: testsuite/g++.dg/cpp0x/noexcept15.C
===================================================================
--- testsuite/g++.dg/cpp0x/noexcept15.C	(revision 210579)
+++ testsuite/g++.dg/cpp0x/noexcept15.C	(working copy)
@@ -23,7 +23,7 @@  template<class Tp>
     return single<typename std::decay<Tp>::type>(x);
   }
 
-class Blob;  // { dg-error "forward declaration" }
+class Blob;  // { dg-message "forward declaration" }
 
 void
 foo(Blob *b)
@@ -30,5 +30,3 @@  foo(Blob *b)
 {
   make_single(*b);
 }
-
-// { dg-prune-output "include" }
Index: testsuite/g++.dg/cpp0x/variadic-ex2.C
===================================================================
--- testsuite/g++.dg/cpp0x/variadic-ex2.C	(revision 210579)
+++ testsuite/g++.dg/cpp0x/variadic-ex2.C	(working copy)
@@ -1,5 +1,5 @@ 
 // { dg-do compile { target c++11 } }
-template<class... Types> struct B { // { dg-error "declaration of" }
+template<class... Types> struct B { // { dg-message "declaration of" }
   void f3();
   void f4();
 };
Index: testsuite/g++.dg/eh/spec6.C
===================================================================
--- testsuite/g++.dg/eh/spec6.C	(revision 210579)
+++ testsuite/g++.dg/eh/spec6.C	(working copy)
@@ -3,7 +3,7 @@ 
 
 // { dg-options "-fpermissive -w" }
 
-struct A;			// { dg-error "" }
+struct A;			// { dg-message "" }
 
 struct B
 {
Index: testsuite/g++.dg/expr/cast1.C
===================================================================
--- testsuite/g++.dg/expr/cast1.C	(revision 210579)
+++ testsuite/g++.dg/expr/cast1.C	(working copy)
@@ -1,3 +1,3 @@ 
-struct S; // { dg-error "forward" } 
+struct S; // { dg-message "forward" } 
 
 void f(S* p) { ((S) (*p)); } // { dg-error "" }
Index: testsuite/g++.dg/expr/dtor1.C
===================================================================
--- testsuite/g++.dg/expr/dtor1.C	(revision 210579)
+++ testsuite/g++.dg/expr/dtor1.C	(working copy)
@@ -1,4 +1,4 @@ 
-class Foo; // { dg-error "" }
+class Foo; // { dg-message "" }
 
 void
 bar(void* p)
Index: testsuite/g++.dg/ext/is_base_of_diagnostic.C
===================================================================
--- testsuite/g++.dg/ext/is_base_of_diagnostic.C	(revision 210579)
+++ testsuite/g++.dg/ext/is_base_of_diagnostic.C	(working copy)
@@ -1,7 +1,7 @@ 
 class A
 { };
 
-class B; // { dg-error "forward declaration" }
+class B; // { dg-message "forward declaration" }
 
 union C
 { };
Index: testsuite/g++.dg/ext/unary_trait_incomplete.C
===================================================================
--- testsuite/g++.dg/ext/unary_trait_incomplete.C	(revision 210579)
+++ testsuite/g++.dg/ext/unary_trait_incomplete.C	(working copy)
@@ -1,6 +1,6 @@ 
 // PR c++/39475
 
-struct I; // { dg-error "forward declaration" }
+struct I; // { dg-message "forward declaration" }
 struct C { };
 
 bool nas1 = __has_nothrow_assign(I); // { dg-error "incomplete type" }
Index: testsuite/g++.dg/gomp/pr49223-2.C
===================================================================
--- testsuite/g++.dg/gomp/pr49223-2.C	(revision 210579)
+++ testsuite/g++.dg/gomp/pr49223-2.C	(working copy)
@@ -3,7 +3,7 @@ 
 // { dg-require-effective-target tls }
 // { dg-options "-fopenmp" }
 
-struct S;			// { dg-error "forward declaration" }
+struct S;			// { dg-message "forward declaration" }
 extern __thread struct S s;	// { dg-error "has incomplete type" }
 struct T;
 extern __thread struct T t;
Index: testsuite/g++.dg/gomp/udr-4.C
===================================================================
--- testsuite/g++.dg/gomp/udr-4.C	(revision 210579)
+++ testsuite/g++.dg/gomp/udr-4.C	(working copy)
@@ -1,6 +1,6 @@ 
 // { dg-do compile }
 
-struct S;					// { dg-error "forward declaration" }
+struct S;					// { dg-message "forward declaration" }
 #pragma omp declare reduction (+:S:omp_out.s += omp_in.s) // { dg-error "invalid use of incomplete type" }
 struct S { int s; S () : s (1) {} };
 #pragma omp declare reduction (*:S:omp_out.s *= omp_in.s)
Index: testsuite/g++.dg/init/delete1.C
===================================================================
--- testsuite/g++.dg/init/delete1.C	(revision 210579)
+++ testsuite/g++.dg/init/delete1.C	(working copy)
@@ -1,6 +1,6 @@ 
 // PR c++/19811
 
-class C; // { dg-warning "forward" }
+class C; // { dg-message "forward" }
 
 void foo(void *p) {
   delete [] ((C*)p) ; // { dg-warning "problem|incomplete" }
Index: testsuite/g++.dg/other/crash-2.C
===================================================================
--- testsuite/g++.dg/other/crash-2.C	(revision 210579)
+++ testsuite/g++.dg/other/crash-2.C	(working copy)
@@ -3,7 +3,7 @@ 
 // Contributed by Hans Buchmann <hans dot buchmann at fhso dot ch>
 // PR c++/14033: ICE while inlining a function with incomplete parameter
 
-struct A;           // { dg-error "forward declaration" }
+struct A;           // { dg-message "forward declaration" }
 void foo(A a) {}    // { dg-error "incomplete" }
 struct A {};
 
Index: testsuite/g++.dg/parse/crash24.C
===================================================================
--- testsuite/g++.dg/parse/crash24.C	(revision 210579)
+++ testsuite/g++.dg/parse/crash24.C	(working copy)
@@ -1,6 +1,6 @@ 
 // PR c++/20461
 // { dg-do compile }
 
-class C; // { dg-error "forward declaration" }
+class C; // { dg-message "forward declaration" }
 
 C::C() : f() {} // { dg-error "invalid use|does not have" }
Index: testsuite/g++.dg/parse/crash25.C
===================================================================
--- testsuite/g++.dg/parse/crash25.C	(revision 210579)
+++ testsuite/g++.dg/parse/crash25.C	(working copy)
@@ -4,7 +4,7 @@ 
  
 struct yyguts_t 
 { 
-  class TestScanner* yyextra_r; // { dg-error "forward declaration" }
+  class TestScanner* yyextra_r; // { dg-message "forward declaration" }
 }; 
     
 TestScanner::TestScanner() {} // { dg-error "invalid use" }
Index: testsuite/g++.dg/parse/crash31.C
===================================================================
--- testsuite/g++.dg/parse/crash31.C	(revision 210579)
+++ testsuite/g++.dg/parse/crash31.C	(working copy)
@@ -1,4 +1,4 @@ 
-struct A // { dg-error "forward declaration" }
+struct A // { dg-message "forward declaration" }
 {
   A : A; // { dg-error "expected|incomplete" }
   A : B; // { dg-error "not declared|incomplete" }
Index: testsuite/g++.dg/parse/crash49.C
===================================================================
--- testsuite/g++.dg/parse/crash49.C	(revision 210579)
+++ testsuite/g++.dg/parse/crash49.C	(working copy)
@@ -1,7 +1,7 @@ 
 // PR c++/37552
 // { dg-do compile }
 
-extern struct A a[1];	// { dg-error "forward declaration" }
+extern struct A a[1];	// { dg-message "forward declaration" }
 
 void
 foo ()
Index: testsuite/g++.dg/parse/crash50.C
===================================================================
--- testsuite/g++.dg/parse/crash50.C	(revision 210579)
+++ testsuite/g++.dg/parse/crash50.C	(working copy)
@@ -2,7 +2,7 @@ 
 // Origin PR c++/38636
 // { dg-do compile }
 
-struct A; // { dg-error "forward declaration of 'struct A'" }
+struct A; // { dg-message "forward declaration of 'struct A'" }
 
 A::A(
 
Index: testsuite/g++.dg/parse/crash54.C
===================================================================
--- testsuite/g++.dg/parse/crash54.C	(revision 210579)
+++ testsuite/g++.dg/parse/crash54.C	(working copy)
@@ -1,6 +1,6 @@ 
 // PR c++/42057
 
-struct A; // { dg-error "forward declaration" }
+struct A; // { dg-message "forward declaration" }
 
 struct B
 {
Index: testsuite/g++.dg/parse/dtor7.C
===================================================================
--- testsuite/g++.dg/parse/dtor7.C	(revision 210579)
+++ testsuite/g++.dg/parse/dtor7.C	(working copy)
@@ -1,4 +1,4 @@ 
 // PR c++/25856
 
-struct A; // { dg-error "forward" } 
+struct A; // { dg-message "forward" } 
 A::~A() {} // { dg-error "incomplete" }
Index: testsuite/g++.dg/parse/error40.C
===================================================================
--- testsuite/g++.dg/parse/error40.C	(revision 210579)
+++ testsuite/g++.dg/parse/error40.C	(working copy)
@@ -1,7 +1,7 @@ 
 // PR c++/31489
 
-class foo;   // { dg-error "'class foo'" }
-struct bar;  // { dg-error "'struct bar'" }
+class foo;   // { dg-message "'class foo'" }
+struct bar;  // { dg-message "'struct bar'" }
 
 int main()
 {
Index: testsuite/g++.dg/parse/fused-params1.C
===================================================================
--- testsuite/g++.dg/parse/fused-params1.C	(revision 210579)
+++ testsuite/g++.dg/parse/fused-params1.C	(working copy)
@@ -2,7 +2,7 @@ 
 // Origin: Alexander Zvyagin <Alexander.Zviagine@cern.ch>
 // { dg-do compile }
 
-template <int N,typename T> struct A //  { dg-error "" }
+template <int N,typename T> struct A //  { dg-message "" }
 {
     typedef T X;
     template <int M> void foo (const A<M,X>&);
Index: testsuite/g++.dg/parse/new1.C
===================================================================
--- testsuite/g++.dg/parse/new1.C	(revision 210579)
+++ testsuite/g++.dg/parse/new1.C	(working copy)
@@ -1,4 +1,4 @@ 
-struct T; // { dg-error "forward" }
+struct T; // { dg-message "forward" }
 T* manage(T* t);
 template <class Obj> struct ObjectSlot0_ {
   void create() {
Index: testsuite/g++.dg/template/crash35.C
===================================================================
--- testsuite/g++.dg/template/crash35.C	(revision 210579)
+++ testsuite/g++.dg/template/crash35.C	(working copy)
@@ -1,7 +1,7 @@ 
 // PR c++/20463
 // { dg-do compile }
 
-template <typename T> struct C; // { dg-error "declaration" }
+template <typename T> struct C; // { dg-message "declaration" }
 
 template <typename T> void C<T>::f() // { dg-error "invalid|template" }
 {
Index: testsuite/g++.dg/template/crash59.C
===================================================================
--- testsuite/g++.dg/template/crash59.C	(revision 210579)
+++ testsuite/g++.dg/template/crash59.C	(working copy)
@@ -1,6 +1,6 @@ 
 //PR c++/27329
 
-template<int> struct A                          // { dg-error "forward declaration" }
+template<int> struct A                          // { dg-message "forward declaration" }
 !                                               // { dg-error "expected unqualified-id" }
   ;
 
Index: testsuite/g++.dg/template/crash77.C
===================================================================
--- testsuite/g++.dg/template/crash77.C	(revision 210579)
+++ testsuite/g++.dg/template/crash77.C	(working copy)
@@ -1,5 +1,5 @@ 
 // PR c++/34603
 
-template<typename> struct A; // { dg-error "declaration" }
+template<typename> struct A; // { dg-message "declaration" }
 
 template<typename T> A<T>::A( struct A; // { dg-error "definition|expected|incomplete" }
Index: testsuite/g++.dg/template/error51.C
===================================================================
--- testsuite/g++.dg/template/error51.C	(revision 210579)
+++ testsuite/g++.dg/template/error51.C	(working copy)
@@ -2,7 +2,7 @@ 
 
 template<int> void foo()
 {
-  struct A;                // { dg-error "declaration" }
+  struct A;                // { dg-message "declaration" }
   struct B : A {};         // { dg-error "invalid use of incomplete" }
 }
 
Index: testsuite/g++.dg/template/incomplete1.C
===================================================================
--- testsuite/g++.dg/template/incomplete1.C	(revision 210579)
+++ testsuite/g++.dg/template/incomplete1.C	(working copy)
@@ -2,7 +2,7 @@ 
 // Origin: Ivan Godard <igodard at pacbell dot net>
 // PR c++/17447: Detect parameters of dependent types even in templates
 
-struct B;   // { dg-error "forward declaration" }
+struct B;   // { dg-message "forward declaration" }
 template<typename T> struct A {
 
     friend A& operator <<(A& a, B b) { return a; } // { dg-error "incomplete" }
Index: testsuite/g++.dg/template/incomplete3.C
===================================================================
--- testsuite/g++.dg/template/incomplete3.C	(revision 210579)
+++ testsuite/g++.dg/template/incomplete3.C	(working copy)
@@ -1,5 +1,5 @@ 
 // PR c++/27315
 // { dg-do compile }
 
-struct A;                  // { dg-error "forward declaration" }
+struct A;                  // { dg-message "forward declaration" }
 template void A::foo<0>(); // { dg-error "before|incomplete" }
Index: testsuite/g++.dg/template/incomplete4.C
===================================================================
--- testsuite/g++.dg/template/incomplete4.C	(revision 210579)
+++ testsuite/g++.dg/template/incomplete4.C	(working copy)
@@ -1,7 +1,7 @@ 
 // PR c++/33501
 // { dg-do compile }
 
-class A;	// { dg-error "forward declaration" }
+class A;	// { dg-message "forward declaration" }
 
 template <typename T> struct X
 {
Index: testsuite/g++.dg/template/incomplete5.C
===================================================================
--- testsuite/g++.dg/template/incomplete5.C	(revision 210579)
+++ testsuite/g++.dg/template/incomplete5.C	(working copy)
@@ -1,7 +1,7 @@ 
 // PR c++/33501
 // { dg-do compile }
 
-class A;	// { dg-error "forward declaration" }
+class A;	// { dg-message "forward declaration" }
 
 template <typename T> struct X
 {
Index: testsuite/g++.dg/template/inherit8.C
===================================================================
--- testsuite/g++.dg/template/inherit8.C	(revision 210579)
+++ testsuite/g++.dg/template/inherit8.C	(working copy)
@@ -4,7 +4,7 @@  template <typename T>
 struct A
 {
   template <typename U>
-  struct B : public A <B<U> >	// { dg-error "declaration" }
+  struct B : public A <B<U> >	// { dg-message "declaration" }
   {
     struct C : public B<U>	// { dg-error "incomplete" }
     {
Index: testsuite/g++.dg/template/instantiate1.C
===================================================================
--- testsuite/g++.dg/template/instantiate1.C	(revision 210579)
+++ testsuite/g++.dg/template/instantiate1.C	(working copy)
@@ -12,7 +12,7 @@  template <class T> struct Y {
   X<T> x;			// { dg-message "required" }
 };
 
-template <class T> struct Z {	// { dg-error "declaration" }
+template <class T> struct Z {	// { dg-message "declaration" }
   Y<Z<T> > y;			// { dg-message "required" }
 };
 
Index: testsuite/g++.dg/template/instantiate3.C
===================================================================
--- testsuite/g++.dg/template/instantiate3.C	(revision 210579)
+++ testsuite/g++.dg/template/instantiate3.C	(working copy)
@@ -4,7 +4,7 @@ 
 // PR c++/7639
 // ICE when accessing member with incomplete type.
 
-class ACE_Null_Mutex;	// { dg-error "forward declaration" }
+class ACE_Null_Mutex;	// { dg-message "forward declaration" }
 
 template <class TYPE>
 struct ACE_Cleanup_Adapter
Index: testsuite/g++.dg/template/offsetof2.C
===================================================================
--- testsuite/g++.dg/template/offsetof2.C	(revision 210579)
+++ testsuite/g++.dg/template/offsetof2.C	(working copy)
@@ -1,7 +1,7 @@ 
 // PR c++/49085
 
 template <class T>
-struct A			// { dg-error "declaration" }
+struct A			// { dg-message "declaration" }
 {
   int i, j;
   int ar[__builtin_offsetof(A,j)]; // { dg-error "incomplete type" }
Index: testsuite/g++.dg/tm/pr51928.C
===================================================================
--- testsuite/g++.dg/tm/pr51928.C	(revision 210579)
+++ testsuite/g++.dg/tm/pr51928.C	(working copy)
@@ -1,7 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-fgnu-tm" } */
 
-struct A; // { dg-error "forward declaration of 'struct A'" }
+struct A; // { dg-message "forward declaration of 'struct A'" }
 
 struct B
 {
Index: testsuite/g++.dg/warn/Wdelete-incomplete-1.C
===================================================================
--- testsuite/g++.dg/warn/Wdelete-incomplete-1.C	(revision 210579)
+++ testsuite/g++.dg/warn/Wdelete-incomplete-1.C	(working copy)
@@ -1,6 +1,6 @@ 
 // PR c++/43452
 
-class Foo;         // { dg-warning "forward" }
+class Foo;         // { dg-message "forward" }
 int main() {
    Foo* p;         // { dg-warning "incomplete" }
    delete [] p;    // { dg-warning "problem" }
Index: testsuite/g++.dg/warn/incomplete1.C
===================================================================
--- testsuite/g++.dg/warn/incomplete1.C	(revision 210579)
+++ testsuite/g++.dg/warn/incomplete1.C	(working copy)
@@ -9,7 +9,7 @@ 
 // (But the deletion does not constitute an ill-formed program. So the
 // program should nevertheless compile, but it should give a warning.)
 
-class A;	// { dg-warning "forward declaration of 'class A'" "" }
+class A;	// { dg-message "forward declaration of 'class A'" "" }
 
 A *a;		// { dg-warning "'a' has incomplete type" "" }
 
Index: testsuite/g++.dg/warn/incomplete2.C
===================================================================
--- testsuite/g++.dg/warn/incomplete2.C	(revision 210579)
+++ testsuite/g++.dg/warn/incomplete2.C	(working copy)
@@ -1,7 +1,7 @@ 
 // PR c++/33501
 // { dg-do compile }
 
-class A;	// { dg-error "forward declaration" }
+class A;	// { dg-message "forward declaration" }
 
 int f (A);			// { dg-message "initializing" }
 const A &make ();
Index: testsuite/g++.old-deja/g++.brendan/friend4.C
===================================================================
--- testsuite/g++.old-deja/g++.brendan/friend4.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.brendan/friend4.C	(working copy)
@@ -2,5 +2,5 @@ 
 // GROUPS passed friends
 // do_friend should complain that foo was declared as a friend of
 // A before A was defined
-struct A; // { dg-error "forward" } 
+struct A; // { dg-message "forward" } 
 struct B { friend A::foo (); };// { dg-error "" } .*
Index: testsuite/g++.old-deja/g++.bugs/900121_01.C
===================================================================
--- testsuite/g++.old-deja/g++.bugs/900121_01.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.bugs/900121_01.C	(working copy)
@@ -7,7 +7,7 @@ 
 
 // keywords: abort, incomplete types, reference types, formal parameters
 
-struct s0;              // { dg-error "" } forward declaration
+struct s0;              // { dg-message "" } forward declaration
 
 void function (struct s0 &arg1, struct s0 &arg2)
 {
Index: testsuite/g++.old-deja/g++.bugs/900214_01.C
===================================================================
--- testsuite/g++.old-deja/g++.bugs/900214_01.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.bugs/900214_01.C	(working copy)
@@ -8,7 +8,7 @@ 
 
 // keywords: friends, incomplete types, function members
 
-struct A;                       // { dg-error "" } forward declaration
+struct A;                       // { dg-message "" } forward declaration
 
 struct B {
   friend void A::foo();		// { dg-error "" } type A is incomplete
Index: testsuite/g++.old-deja/g++.eh/catch1.C
===================================================================
--- testsuite/g++.old-deja/g++.eh/catch1.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.eh/catch1.C	(working copy)
@@ -5,7 +5,7 @@ 
 
 // We cannot catch an incomplete type, or ptr to one
 
-struct A; // { dg-error "" } forward decl
+struct A; // { dg-message "" } forward decl
 
 void fn()
 {
Index: testsuite/g++.old-deja/g++.eh/spec6.C
===================================================================
--- testsuite/g++.old-deja/g++.eh/spec6.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.eh/spec6.C	(working copy)
@@ -7,7 +7,7 @@ 
 
 // [except.spec] 1, a type in an exception specifier shall not be incomplete,
 // or pointer or ref to incomplete
-struct X;                         // { dg-error "" } forward declaration.*
+struct X;                         // { dg-message "" } forward declaration.*
 void fn1() throw(X);              // { dg-error "" } invalid use of undefined type
 void fn2() throw(X *);            // { dg-error "" } invalid use of undefined type
 void fn3() throw(X &);            // { dg-error "" } invalid use of undefined tyoe
Index: testsuite/g++.old-deja/g++.mike/p7868.C
===================================================================
--- testsuite/g++.old-deja/g++.mike/p7868.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.mike/p7868.C	(working copy)
@@ -4,13 +4,13 @@ 
 struct DIAGTYP {
 };
 struct DIAGTYP1 {
-  struct DIAGTYP;       // { dg-error "" } forward declaration
+  struct DIAGTYP;       // { dg-message "" } forward declaration
   void bar() { new struct DIAGTYP; }	// { dg-error "" } undefined
   void foo() { new struct DIAGTYP1; }
 };
 
 int main () {
-  struct DIAGTYP;               // { dg-error "" } forward declaration
+  struct DIAGTYP;               // { dg-message "" } forward declaration
   struct DIAGTYP  *lerror_desc;
   lerror_desc= new struct DIAGTYP;	// { dg-error "" } undefined
 }
Index: testsuite/g++.old-deja/g++.other/crash38.C
===================================================================
--- testsuite/g++.old-deja/g++.other/crash38.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.other/crash38.C	(working copy)
@@ -6,7 +6,7 @@ 
 // Bug 611. We ICEd when calling a member function returning an incomplete
 // type by value.
 
-struct X;   // { dg-error "" } forward ref
+struct X;   // { dg-message "" } forward ref
 
 struct Y
 {
Index: testsuite/g++.old-deja/g++.other/enum2.C
===================================================================
--- testsuite/g++.old-deja/g++.other/enum2.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.other/enum2.C	(working copy)
@@ -5,7 +5,7 @@ 
 
 // We'd like the enum location to be its identifier.
 
-enum thing // { dg-error "" } previous def
+enum thing // { dg-message "" } previous def
 {
   val1
 };
Index: testsuite/g++.old-deja/g++.other/incomplete.C
===================================================================
--- testsuite/g++.old-deja/g++.other/incomplete.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.other/incomplete.C	(working copy)
@@ -4,7 +4,7 @@ 
 // a void parm. We need to distinguish between a parmlist of (void), and
 // some ill-formed ones.
 
-struct S; // { dg-error "" } forward ref
+struct S; // { dg-message "" } forward ref
 
 void f(S);            // ok
 void f(S s) {}        // { dg-error "" } incomplete type
Index: testsuite/g++.old-deja/g++.other/vaarg3.C
===================================================================
--- testsuite/g++.old-deja/g++.other/vaarg3.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.other/vaarg3.C	(working copy)
@@ -10,7 +10,7 @@ 
 
 struct X {int m;};
 struct Y { Y(const Y&); };
-struct Z;   // { dg-error "forward decl" } 
+struct Z;   // { dg-message "forward decl" }
 void fn1(va_list args)
 {
   int i = va_arg (args, int);
Index: testsuite/g++.old-deja/g++.pt/crash9.C
===================================================================
--- testsuite/g++.old-deja/g++.pt/crash9.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.pt/crash9.C	(working copy)
@@ -3,7 +3,7 @@ 
 template <class T>
 void f(T) {}			// { dg-message "initializing" }
 
-class C;    // { dg-error "forward declaration" }
+class C;    // { dg-message "forward declaration" }
 
 void g(const C& c)
 {
Index: testsuite/g++.old-deja/g++.pt/niklas01a.C
===================================================================
--- testsuite/g++.old-deja/g++.pt/niklas01a.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.pt/niklas01a.C	(working copy)
@@ -1,7 +1,7 @@ 
 // { dg-do assemble  }
 // { dg-options "-fshow-column" }
 
-struct A { // { dg-error "" } forward declaration
+struct A { // { dg-message "" } forward declaration
   friend struct B : A {		// { dg-error "invalid use of incomplete type 'struct A" "invalid" }
     int x;
   };	// { dg-error "class definition may not be declared a friend" "may not"  { target *-*-* } { 5 } }
Index: testsuite/g++.old-deja/g++.pt/typename8.C
===================================================================
--- testsuite/g++.old-deja/g++.pt/typename8.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.pt/typename8.C	(working copy)
@@ -17,7 +17,7 @@  template < class T > class A
   }
 };
 
-class B : public A< B > // { dg-error "" } forward declaration
+class B : public A< B > // { dg-message "" } forward declaration
 {
 public:
   typedef int myT;
Index: testsuite/g++.old-deja/g++.robertl/ice990323-1.C
===================================================================
--- testsuite/g++.old-deja/g++.robertl/ice990323-1.C	(revision 210579)
+++ testsuite/g++.old-deja/g++.robertl/ice990323-1.C	(working copy)
@@ -4,6 +4,6 @@ 
 struct A {};
 void f()
 {
-        struct A; // { dg-error "" } forward ref
+        struct A; // { dg-message "" } forward ref
         throw *(new A); // { dg-error "" } invalid use of undefined type
 }