prune.exp: Prune "note"s.
authorJason Merrill <jason@redhat.com>
Fri, 10 Jun 2011 03:56:17 +0000 (23:56 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 10 Jun 2011 03:56:17 +0000 (23:56 -0400)
* lib/prune.exp: Prune "note"s.
* g++.dg/uninit-pred-3_b.C: Remove dg-excess-errors.

* g++.dg/ext/injected-ttp.C: Specify -std=c++98.
* g++.dg/template/dependent-expr3.C: Likewise.
* g++.dg/parse/template7.C: Likewise.
* g++.old-deja/g++.bugs/900119_01.C: Likewise.
* g++.old-deja/g++.jason/rfg10.C: Likewise.
* g++.old-deja/g++.pt/friend38.C: Likewise.
* g++.old-deja/g++.pt/crash32.C: Likewise.
* g++.old-deja/g++.other/init4.C: Likewise.
* g++.old-deja/g++.other/friend8.C: Likewise.

* g++.dg/ext/complex7.C: Adjust expected output.
* g++.dg/diagnostic/method1.C: Likewise.
* g++.dg/parse/parameter-declaration-2.C: Likewise.
* g++.dg/parse/crash33.C: Likewise.
* g++.dg/other/warning1.C: Likewise.
* g++.dg/init/pr29571.C: Likewise.
* g++.dg/warn/overflow-warn-1.C: Likewise.
* g++.dg/warn/overflow-warn-3.C: Likewise.
* g++.dg/warn/overflow-warn-4.C: Likewise.
* g++.old-deja/g++.oliva/template1.C: Likewise.

From-SVN: r174886

23 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/method1.C
gcc/testsuite/g++.dg/ext/complex7.C
gcc/testsuite/g++.dg/ext/injected-ttp.C
gcc/testsuite/g++.dg/init/pr29571.C
gcc/testsuite/g++.dg/other/warning1.C
gcc/testsuite/g++.dg/parse/crash33.C
gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
gcc/testsuite/g++.dg/parse/template7.C
gcc/testsuite/g++.dg/template/dependent-expr3.C
gcc/testsuite/g++.dg/uninit-pred-3_b.C
gcc/testsuite/g++.dg/warn/overflow-warn-1.C
gcc/testsuite/g++.dg/warn/overflow-warn-3.C
gcc/testsuite/g++.dg/warn/overflow-warn-4.C
gcc/testsuite/g++.old-deja/g++.bugs/900119_01.C
gcc/testsuite/g++.old-deja/g++.jason/rfg10.C
gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-2005 [moved from gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog with 100% similarity]
gcc/testsuite/g++.old-deja/g++.oliva/template1.C
gcc/testsuite/g++.old-deja/g++.other/friend8.C
gcc/testsuite/g++.old-deja/g++.other/init4.C
gcc/testsuite/g++.old-deja/g++.pt/crash32.C
gcc/testsuite/g++.old-deja/g++.pt/friend38.C
gcc/testsuite/lib/prune.exp

index 54b17c2..d93c01a 100644 (file)
@@ -1,5 +1,29 @@
 2011-06-09  Jason Merrill  <jason@redhat.com>
 
+       * lib/prune.exp: Prune "note"s.
+       * g++.dg/uninit-pred-3_b.C: Remove dg-excess-errors.
+
+       * g++.dg/ext/injected-ttp.C: Specify -std=c++98.
+       * g++.dg/template/dependent-expr3.C: Likewise.
+       * g++.dg/parse/template7.C: Likewise.
+       * g++.old-deja/g++.bugs/900119_01.C: Likewise.
+       * g++.old-deja/g++.jason/rfg10.C: Likewise.
+       * g++.old-deja/g++.pt/friend38.C: Likewise.
+       * g++.old-deja/g++.pt/crash32.C: Likewise.
+       * g++.old-deja/g++.other/init4.C: Likewise.
+       * g++.old-deja/g++.other/friend8.C: Likewise.
+
+       * g++.dg/ext/complex7.C: Adjust expected output.
+       * g++.dg/diagnostic/method1.C: Likewise.
+       * g++.dg/parse/parameter-declaration-2.C: Likewise.
+       * g++.dg/parse/crash33.C: Likewise.
+       * g++.dg/other/warning1.C: Likewise.
+       * g++.dg/init/pr29571.C: Likewise.
+       * g++.dg/warn/overflow-warn-1.C: Likewise.
+       * g++.dg/warn/overflow-warn-3.C: Likewise.
+       * g++.dg/warn/overflow-warn-4.C: Likewise.
+       * g++.old-deja/g++.oliva/template1.C: Likewise.
+
        * g++.dg/cpp0x/regress/error-recovery1.C: Adjust.
        * g++.dg/parse/template7.C: Adjust.
 
index 8e1225d..4a78104 100644 (file)
@@ -18,3 +18,5 @@ baz ()
 {
   bar <int> ();
 }
+
+// { dg-prune-output "without object" }
index 9d5463f..5b3eead 100644 (file)
@@ -4,3 +4,5 @@ class A
 {
   static const _Complex double x = 1.0 + 2.0i;
 };
+
+// { dg-prune-output "constexpr. needed" }
index 405bee8..5ef4a4e 100644 (file)
@@ -1,7 +1,7 @@
 // Test for doing the right thing with injected-class-name used as template
 // type argument.  This is an extension from DR 176.
 
-// { dg-options "-pedantic" }
+// { dg-options "-pedantic -std=c++98" }
 
 template <class T>
 struct A { };
index 9e8e609..c9bfa28 100644 (file)
@@ -3,6 +3,6 @@
 struct A
 {
   static const int i = 0/0 + ""; // { dg-warning "division by zero" }
-  // { dg-error "field initializer is not constant" "" { target *-*-* } 5 }
+  // { dg-error "field initializer is not constant|not a constant-expression" "" { target *-*-* } 5 }
   static const int j = int(i);
 };
index 77653a1..c65ae0f 100644 (file)
@@ -7,8 +7,8 @@ extern "C" int printf(const char *, ...);
 
 struct S
 {
-  static const float inf = 1.0f / 0.0f; // { dg-warning "1.0|float|initialization" }
-  static const float nan = 0.0f / 0.0f; // { dg-warning "0.0|float|initialization" }
+  static const float inf = 1.0f / 0.0f; // { dg-warning "1.0|float|initializ" }
+  static const float nan = 0.0f / 0.0f; // { dg-warning "0.0|float|initializ" }
 };
 
 int main()
index 2ab84df..5ccb652 100644 (file)
@@ -4,5 +4,8 @@
 template<int>
 void foo()
 [
-  throw;       // { dg-error "expected" }
-}              // { dg-error "expected" }
+  throw;
+}
+
+// { dg-prune-output "expected" }
+// { dg-prune-output "array bound" }
index 7a9a24f..6116630 100644 (file)
@@ -1 +1,2 @@
 void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
+// { dg-prune-output "array bound" }
index d7dfef7..930e259 100644 (file)
@@ -1,3 +1,5 @@
+// { dg-options -std=c++98 }
+
 template <int I>
 void f();                      // { dg-message "note" }
 
index 97fddbd..bf14c49 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-options -std=c++98 }
 // { dg-do compile }
 // Origin: jbrandmeyer at users dot sourceforge dot net
 // PR c++/12573: COMPONENT_REFs must be inspected for dependness.
index cfe2113..a66e04b 100644 (file)
@@ -65,7 +65,7 @@ class M {
 
   void P (int64 t)
     {
-      int cc; /* { dg-excess-errors "note: 'cc' was declared here" } */
+      int cc;
       if (!GetC (&cc))
         return;
 
index 22c512a..7cd76e7 100644 (file)
@@ -13,7 +13,7 @@ enum e {
      in the standard).  */
   E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } 14 } */
   E3 = 1 / 0, /* { dg-warning "division by zero" } */
-  /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant expression" "enum error" { target *-*-* } 15 } */
+  /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } 15 } */
   /* But as in DR#031, the 1/0 in an evaluated subexpression means the
      whole expression violates the constraints.  */
   E4 = 0 * (1 / 0), /* { dg-warning "division by zero" } */
index d88c87a..73c0e00 100644 (file)
@@ -13,7 +13,7 @@ enum e {
      in the standard).  */
   E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } 14 } */
   E3 = 1 / 0, /* { dg-warning "division by zero" } */
-  /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant expression" "enum error" { target *-*-* } 15 } */
+  /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } 15 } */
   /* But as in DR#031, the 1/0 in an evaluated subexpression means the
      whole expression violates the constraints.  */
   E4 = 0 * (1 / 0), /* { dg-warning "division by zero" } */
index 374d294..24b3959 100644 (file)
@@ -13,7 +13,7 @@ enum e {
      in the standard).  */
   E2 = 2 || 1 / 0, /* { dg-bogus "warning: division by zero" "" { xfail *-*-* } } */
   E3 = 1 / 0, /* { dg-warning "division by zero" } */
-  /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant expression" "enum error" { target *-*-* } 15 } */
+  /* { dg-error "enumerator value for 'E3' is not an integer constant|not a constant.expression" "enum error" { target *-*-* } 15 } */
   /* But as in DR#031, the 1/0 in an evaluated subexpression means the
      whole expression violates the constraints.  */
   E4 = 0 * (1 / 0), /* { dg-warning "division by zero" } */
index ace4e4b..0d181c7 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-options "-pedantic-errors -std=c++98" }
 // { dg-do assemble  }
 // g++ 1.36.1 bug 900119_01
 
@@ -8,7 +9,7 @@
 
 // keywords: member declaration, member initialization
 
-// { dg-prune-output "non-static data member initializers" }
+// { dg-prune-output "is a static data member" }
 
 int global_int;
 
@@ -18,7 +19,7 @@ public:
   static int class0_member_1 = 99;             /* { dg-error "" }  */
   int &class0_member_2 = global_int;           /* { dg-error "" }  */
 
-  class0 () : class0_member_2 (global_int) { }  /* { dg-error "" }  */
+  class0 () : class0_member_2 (global_int) { }
 };
 
 
@@ -27,7 +28,7 @@ struct struct0 {
   static int struct0_member_1 = 99;            /* { dg-error "" }  */
   int &struct0_member_2 = global_int;          /* { dg-error "" }  */
 
-  struct0 () : struct0_member_2 (global_int) { } /* { dg-error "" }  */
+  struct0 () : struct0_member_2 (global_int) { }
 };
 
 // g++ does not allow unions to have more than one member with an initializer
@@ -43,7 +44,7 @@ union union1 {
 union union2 {
   int &union2_member_0 = global_int;           /* { dg-error "" }  */
 
-  union2 () : union2_member_0 (global_int) { }  /* { dg-error "" }  */
+  union2 () : union2_member_0 (global_int) { }
 };
 
 int main () { return 0; }
index 58af19c..8769f5a 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do assemble  }
-// { dg-options "-pedantic-errors" }
+// { dg-options "-pedantic-errors -std=c++98" }
 // Bug: g++ doesn't notice the overflow in the enum values.
 
 #include <limits.h>
index ce39496..908a069 100644 (file)
@@ -7,7 +7,7 @@
 
 
 template<int P = 0> struct foo {
-  static void bar(double (*)[dim]) {} // { dg-error "'dim' was not declared" } 
+  static void bar(double (*)[dim]) {} // { dg-error "'dim' was not declared|array bound" }
 };
 
 void bar() {
index bbe4bf5..c1e93d9 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-options "-std=c++98 -pedantic-errors" }
 // { dg-do assemble  }
 // 
 // Copyright (C) 2000 Free Software Foundation, Inc.
index f877f2a..92562ef 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-options -std=c++98 }
 // { dg-do assemble  }
 
 class error {
index 64ed229..0be26ea 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-options "-std=c++98 -pedantic-errors" }
 // { dg-do assemble  }
 // Origin: Jason Merrill <jason@cygnus.com>
 
index 429e421..f2343d0 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-options "-std=c++98 -pedantic-errors" }
 // { dg-do assemble  }
 
 // Overly simplified from testcase by "B. K. Oxley" <binkley@bigfoot.com>
index 58b59a4..f5cbc4c 100644 (file)
@@ -30,6 +30,9 @@ proc prune_gcc_output { text } {
     regsub -all "(^|\n)Please submit.*instructions\[^\n\]*" $text "" text
     regsub -all "(^|\n)\[0-9\]\[0-9\]* errors\." $text "" text
 
+    # Ignore informational notes.
+    regsub -all "(^|\n)\[^\n\]*: note: \[^\n\]*" $text "" text
+
     # Ignore harmless -fpic warnings.
     regsub -all "(^|\n)\[^\n\]*: warning: -f(pic|PIC) ignored for target\[^\n\]*" $text "" text
     regsub -all "(^|\n)\[^\n\]*: warning: -f(pic|PIC)( and -fpic are| is)? not supported\[^\n\]*" $text "" text