diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2583e5e47aa..2d5617a35cc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2013-12-05 Paolo Carlini + + * decl.c (duplicate_decls): Replace pairs of errors and permerrors + with error + inform (permerror + inform, respectively). + 2013-12-04 Joseph Myers PR c/52023 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 820d9c08f7b..a6744c77cba 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -1299,8 +1299,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) { if (warning (OPT_Wattributes, "function %q+D redeclared as inline", newdecl)) - inform (input_location, "previous declaration of %q+D " - "with attribute noinline", olddecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration of %qD with attribute noinline", + olddecl); } else if (DECL_DECLARED_INLINE_P (olddecl) && DECL_UNINLINABLE (newdecl) @@ -1308,7 +1309,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) { if (warning (OPT_Wattributes, "function %q+D redeclared with " "attribute noinline", newdecl)) - inform (input_location, "previous declaration of %q+D was inline", + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration of %qD was inline", olddecl); } } @@ -1343,11 +1345,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) warning (0, "library function %q#D redeclared as non-function %q#D", olddecl, newdecl); else - { - error ("declaration of %q#D", newdecl); - error ("conflicts with built-in declaration %q#D", - olddecl); - } + error ("declaration of %q#D conflicts with built-in " + "declaration %q#D", newdecl, olddecl); return NULL_TREE; } else if (DECL_OMP_DECLARE_REDUCTION_P (olddecl)) @@ -1355,8 +1354,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) gcc_assert (DECL_OMP_DECLARE_REDUCTION_P (newdecl)); error_at (DECL_SOURCE_LOCATION (newdecl), "redeclaration of %"); - error_at (DECL_SOURCE_LOCATION (olddecl), - "previous % declaration"); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous % declaration"); return error_mark_node; } else if (!types_match) @@ -1407,11 +1406,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) /* A near match; override the builtin. */ if (TREE_PUBLIC (newdecl)) - { - warning (0, "new declaration %q#D", newdecl); - warning (0, "ambiguates built-in declaration %q#D", - olddecl); - } + warning (0, "new declaration %q#D ambiguates built-in " + "declaration %q#D", newdecl, olddecl); else warning (OPT_Wshadow, DECL_BUILT_IN (olddecl) @@ -1504,7 +1500,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) error ("%q#D redeclared as different kind of symbol", newdecl); if (TREE_CODE (olddecl) == TREE_LIST) olddecl = TREE_VALUE (olddecl); - inform (input_location, "previous declaration of %q+#D", olddecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration %q#D", olddecl); return error_mark_node; } @@ -1523,8 +1520,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) if (TREE_CODE (DECL_TEMPLATE_RESULT (olddecl)) == TYPE_DECL || TREE_CODE (DECL_TEMPLATE_RESULT (newdecl)) == TYPE_DECL) { - error ("declaration of template %q#D", newdecl); - error ("conflicts with previous declaration %q+#D", olddecl); + error ("conflicting declaration of template %q#D", newdecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration %q#D", olddecl); return error_mark_node; } else if (TREE_CODE (DECL_TEMPLATE_RESULT (olddecl)) == FUNCTION_DECL @@ -1538,8 +1536,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) && same_type_p (TREE_TYPE (TREE_TYPE (newdecl)), TREE_TYPE (TREE_TYPE (olddecl)))) { - error ("new declaration %q#D", newdecl); - error ("ambiguates old declaration %q+#D", olddecl); + error ("ambiguating new declaration %q#D", newdecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "old declaration %q#D", olddecl); } return NULL_TREE; } @@ -1547,9 +1546,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) { if (DECL_EXTERN_C_P (newdecl) && DECL_EXTERN_C_P (olddecl)) { - error ("declaration of C function %q#D conflicts with", + error ("conflicting declaration of C function %q#D", newdecl); - error ("previous declaration %q+#D here", olddecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration %q#D", olddecl); return NULL_TREE; } /* For function versions, params and types match, but they @@ -1559,8 +1559,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) && compparms (TYPE_ARG_TYPES (TREE_TYPE (newdecl)), TYPE_ARG_TYPES (TREE_TYPE (olddecl)))) { - error ("new declaration %q#D", newdecl); - error ("ambiguates old declaration %q+#D", olddecl); + error ("ambiguating new declaration of %q#D", newdecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "old declaration %q#D", olddecl); return error_mark_node; } else @@ -1569,8 +1570,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) else { error ("conflicting declaration %q#D", newdecl); - inform (input_location, - "%q+D has a previous declaration as %q#D", olddecl, olddecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration as %q#D", olddecl); return error_mark_node; } } @@ -1622,8 +1623,9 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) A namespace-name defined at global scope shall not be declared as the name of any other entity in any global scope of the program. */ - error ("declaration of namespace %qD conflicts with", newdecl); - error ("previous declaration of namespace %q+D here", olddecl); + error ("conflicting declaration of namespace %qD", newdecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration of namespace %qD here", olddecl); return error_mark_node; } else @@ -1645,9 +1647,10 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) && prototype_p (TREE_TYPE (newdecl))) { /* Prototype decl follows defn w/o prototype. */ - warning_at (input_location, 0, "prototype for %q+#D", newdecl); - warning_at (DECL_SOURCE_LOCATION (olddecl), 0, - "follows non-prototype definition here"); + warning_at (DECL_SOURCE_LOCATION (newdecl), 0, + "prototype specified for %q#D", newdecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous non-prototype definition here"); } else if (VAR_OR_FUNCTION_DECL_P (olddecl) && DECL_LANGUAGE (newdecl) != DECL_LANGUAGE (olddecl)) @@ -1686,10 +1689,11 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) } else { - error ("previous declaration of %q+#D with %qL linkage", - olddecl, DECL_LANGUAGE (olddecl)); - error ("conflicts with new declaration with %qL linkage", - DECL_LANGUAGE (newdecl)); + error ("conflicting declaration of %q#D with %qL linkage", + newdecl, DECL_LANGUAGE (newdecl)); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration with %qL linkage", + DECL_LANGUAGE (olddecl)); } } @@ -1729,19 +1733,20 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) if (1 == simple_cst_equal (TREE_PURPOSE (t1), TREE_PURPOSE (t2))) { - permerror (input_location, - "default argument given for parameter %d " - "of %q#D", i, newdecl); - permerror (input_location, - "after previous specification in %q+#D", - olddecl); + if (permerror (input_location, + "default argument given for parameter " + "%d of %q#D", i, newdecl)) + permerror (DECL_SOURCE_LOCATION (olddecl), + "previous specification in %q#D here", + olddecl); } else { error ("default argument given for parameter %d " "of %q#D", i, newdecl); - error ("after previous specification in %q+#D", - olddecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous specification in %q#D here", + olddecl); } } } @@ -1805,7 +1810,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) if (warning (OPT_Wredundant_decls, "redundant redeclaration of %qD in same scope", newdecl)) - inform (input_location, "previous declaration of %q+D", olddecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration of %qD", olddecl); } if (!(DECL_TEMPLATE_INSTANTIATION (olddecl) @@ -1814,7 +1820,8 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) if (DECL_DELETED_FN (newdecl)) { error ("deleted definition of %qD", newdecl); - error ("after previous declaration %q+D", olddecl); + inform (DECL_SOURCE_LOCATION (olddecl), + "previous declaration of %qD", olddecl); } DECL_DELETED_FN (newdecl) |= DECL_DELETED_FN (olddecl); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b074cfab8e3..fa75f4f85f2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,26 @@ +2013-12-05 Paolo Carlini + + * g++.dg/cpp0x/constexpr-46336.C: Adjust expected messages. + * g++.dg/cpp0x/defaulted2.C: Likewise. + * g++.dg/cpp1y/auto-fn8.C: Likewise. + * g++.dg/gomp/udr-3.C: Likewise. + * g++.dg/lookup/extern-c-redecl5.C: Likewise. + * g++.dg/lookup/linkage1.C: Likewise. + * g++.dg/overload/new1.C: Likewise. + * g++.dg/parse/friend5.C: Likewise. + * g++.dg/parse/namespace-alias-1.C: Likewise. + * g++.dg/parse/namespace10.C: Likewise. + * g++.dg/parse/redef2.C: Likewise. + * g++.dg/template/friend44.C: Likewise. + * g++.old-deja/g++.brendan/crash42.C: Likewise. + * g++.old-deja/g++.brendan/crash52.C: Likewise. + * g++.old-deja/g++.brendan/crash55.C: Likewise. + * g++.old-deja/g++.jason/overload21.C: Likewise. + * g++.old-deja/g++.jason/overload5.C: Likewise. + * g++.old-deja/g++.jason/redecl1.C: Likewise. + * g++.old-deja/g++.law/arm8.C: Likewise. + * g++.old-deja/g++.other/main1.C: Likewise. + 2013-12-05 Richard Biener PR tree-optimization/56787 diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C index 4268a6ba43a..c021e980352 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C @@ -4,7 +4,7 @@ extern "C" { enum A { }; inline constexpr A - f(A a, A b) // { dg-error "previous declaration" } + f(A a, A b) // { dg-message "previous declaration" } { return A(static_cast(a) & static_cast(b)); } enum B { }; inline constexpr B diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted2.C b/gcc/testsuite/g++.dg/cpp0x/defaulted2.C index 3cef60050ac..5f05424dc34 100644 --- a/gcc/testsuite/g++.dg/cpp0x/defaulted2.C +++ b/gcc/testsuite/g++.dg/cpp0x/defaulted2.C @@ -1,7 +1,7 @@ // Negative test for defaulted/deleted fns. // { dg-options "-std=c++11" } -void f(); // { dg-error "previous" } +void f(); // { dg-message "previous" } void f() = delete; // { dg-error "deleted" } struct A diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn8.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn8.C index 072f6145a28..15ccfc566cc 100644 --- a/gcc/testsuite/g++.dg/cpp1y/auto-fn8.C +++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn8.C @@ -1,6 +1,6 @@ // { dg-options "-std=c++1y -pedantic-errors" } -auto f() { return 42; } // { dg-error "old declaration .auto" } +auto f() { return 42; } // { dg-message "old declaration .auto" } auto f(); // OK int f(); // { dg-error "new declaration" } diff --git a/gcc/testsuite/g++.dg/gomp/udr-3.C b/gcc/testsuite/g++.dg/gomp/udr-3.C index a560fc1b537..9fc6f40820a 100644 --- a/gcc/testsuite/g++.dg/gomp/udr-3.C +++ b/gcc/testsuite/g++.dg/gomp/udr-3.C @@ -63,12 +63,12 @@ int y = f4 (); namespace N1 { - #pragma omp declare reduction (+: ::S: omp_out.s *= omp_in.s) // { dg-error "previous" } + #pragma omp declare reduction (+: ::S: omp_out.s *= omp_in.s) // { dg-message "previous" } #pragma omp declare reduction (+: S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" } void f5 () { - #pragma omp declare reduction (f5: S: omp_out.s *= omp_in.s) // { dg-error "previous" } + #pragma omp declare reduction (f5: S: omp_out.s *= omp_in.s) // { dg-message "previous" } #pragma omp declare reduction (f5: ::S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" } } } @@ -84,10 +84,10 @@ namespace N2 namespace N3 { - #pragma omp declare reduction (+: ::S: omp_out.s *= omp_in.s) // { dg-error "previous" } + #pragma omp declare reduction (+: ::S: omp_out.s *= omp_in.s) // { dg-message "previous" } #pragma omp declare reduction (+: T: omp_out.t += omp_in.t) #pragma omp declare reduction (+: S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" } - #pragma omp declare reduction (n3: long: omp_out += omp_in) // { dg-error "previous" } + #pragma omp declare reduction (n3: long: omp_out += omp_in) // { dg-message "previous" } #pragma omp declare reduction (n3: long int: omp_out += omp_in) // { dg-error "redeclaration of" } #pragma omp declare reduction (n3: short unsigned: omp_out += omp_in) #pragma omp declare reduction (n3: short int: omp_out += omp_in) @@ -95,9 +95,9 @@ namespace N3 f6 () { #pragma omp declare reduction (f6: T: omp_out.t += omp_in.t) - #pragma omp declare reduction (f6: S: omp_out.s *= omp_in.s) // { dg-error "previous" } + #pragma omp declare reduction (f6: S: omp_out.s *= omp_in.s) // { dg-message "previous" } #pragma omp declare reduction (f6: ::S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" } - #pragma omp declare reduction (f6: long: omp_out += omp_in) // { dg-error "previous" } + #pragma omp declare reduction (f6: long: omp_out += omp_in) // { dg-message "previous" } #pragma omp declare reduction (f6: long int: omp_out += omp_in) // { dg-error "redeclaration of" } #pragma omp declare reduction (f6: short unsigned: omp_out += omp_in) #pragma omp declare reduction (f6: short int: omp_out += omp_in) @@ -124,7 +124,7 @@ namespace N5 int f7 () { - #pragma omp declare reduction (f7: T: omp_out.s *= omp_in.s) // { dg-error "previous" } + #pragma omp declare reduction (f7: T: omp_out.s *= omp_in.s) // { dg-message "previous" } #pragma omp declare reduction (f7: T: omp_out.s += omp_in.s) // { dg-error "redeclaration of" } return 0; } @@ -145,9 +145,9 @@ namespace N6 f8 () { #pragma omp declare reduction (f8: T: omp_out.t += omp_in.t) - #pragma omp declare reduction (f8: U: omp_out.s *= omp_in.s) // { dg-error "previous" } + #pragma omp declare reduction (f8: U: omp_out.s *= omp_in.s) // { dg-message "previous" } #pragma omp declare reduction (f8: ::S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" } - #pragma omp declare reduction (f8: long: omp_out += omp_in) // { dg-error "previous" } + #pragma omp declare reduction (f8: long: omp_out += omp_in) // { dg-message "previous" } #pragma omp declare reduction (f8: long int: omp_out += omp_in) // { dg-error "redeclaration of" } #pragma omp declare reduction (f8: short unsigned: omp_out += omp_in) #pragma omp declare reduction (f8: short int: omp_out += omp_in) diff --git a/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C b/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C index 51a342d433c..4d934c1045c 100644 --- a/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C +++ b/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C @@ -6,11 +6,11 @@ class frok { int this_errno; - friend int fork (void); // { dg-error "previous declaration .*?C\\+\\+. linkage" } + friend int fork (void); // { dg-message "previous declaration .*?C\\+\\+. linkage" } }; extern "C" int -fork (void) // { dg-error "conflicts with new declaration .*?C. linkage" }} +fork (void) // { dg-error "conflicting declaration .*?C. linkage" }} { frok grouped; return grouped.this_errno; diff --git a/gcc/testsuite/g++.dg/lookup/linkage1.C b/gcc/testsuite/g++.dg/lookup/linkage1.C index 6f6bdfdea8a..aa6983c54c8 100644 --- a/gcc/testsuite/g++.dg/lookup/linkage1.C +++ b/gcc/testsuite/g++.dg/lookup/linkage1.C @@ -1,4 +1,4 @@ // DR 563 -extern int i; // { dg-error "linkage" } +extern int i; // { dg-message "linkage" } extern "C" int i; // { dg-error "linkage" } diff --git a/gcc/testsuite/g++.dg/overload/new1.C b/gcc/testsuite/g++.dg/overload/new1.C index f1b7328366f..bf2190b8e05 100644 --- a/gcc/testsuite/g++.dg/overload/new1.C +++ b/gcc/testsuite/g++.dg/overload/new1.C @@ -7,7 +7,7 @@ struct X{ }; -void f(X *x = new X); // { dg-error "" } +void f(X *x = new X); // { dg-message "" } void f(X *x = new X(4)); // { dg-error "" } diff --git a/gcc/testsuite/g++.dg/parse/friend5.C b/gcc/testsuite/g++.dg/parse/friend5.C index bf1e6bfa6dd..43f06129b20 100644 --- a/gcc/testsuite/g++.dg/parse/friend5.C +++ b/gcc/testsuite/g++.dg/parse/friend5.C @@ -2,6 +2,6 @@ extern "C" struct A { - friend void foo(int) {} // { dg-error "declaration" } + friend void foo(int) {} // { dg-message "declaration" } friend void foo() {} // { dg-error "foo" "err" } }; diff --git a/gcc/testsuite/g++.dg/parse/namespace-alias-1.C b/gcc/testsuite/g++.dg/parse/namespace-alias-1.C index 627a95bc655..4b443359a61 100644 --- a/gcc/testsuite/g++.dg/parse/namespace-alias-1.C +++ b/gcc/testsuite/g++.dg/parse/namespace-alias-1.C @@ -2,6 +2,6 @@ namespace N { - namespace M = N; // { dg-error "previous declaration" } + namespace M = N; // { dg-message "previous declaration" } namespace M {} // { dg-error "declaration of namespace" } } diff --git a/gcc/testsuite/g++.dg/parse/namespace10.C b/gcc/testsuite/g++.dg/parse/namespace10.C index 9f93d1b6897..5e9541adb1d 100644 --- a/gcc/testsuite/g++.dg/parse/namespace10.C +++ b/gcc/testsuite/g++.dg/parse/namespace10.C @@ -1,6 +1,6 @@ // PR c++/16529 -namespace m {} // { dg-error "" } +namespace m {} // { dg-message "" } namespace n { namespace m {} diff --git a/gcc/testsuite/g++.dg/parse/redef2.C b/gcc/testsuite/g++.dg/parse/redef2.C index 3ab3667d82d..85c50644557 100644 --- a/gcc/testsuite/g++.dg/parse/redef2.C +++ b/gcc/testsuite/g++.dg/parse/redef2.C @@ -1,6 +1,6 @@ // { dg-do compile } -char * d [10]; // { dg-message "8: 'd' has a previous declaration as" } +char * d [10]; // { dg-message "8: previous declaration as" } char e [15][10]; int (*f)(); diff --git a/gcc/testsuite/g++.dg/template/friend44.C b/gcc/testsuite/g++.dg/template/friend44.C index 814fec1d5f7..6ff4db3a3b6 100644 --- a/gcc/testsuite/g++.dg/template/friend44.C +++ b/gcc/testsuite/g++.dg/template/friend44.C @@ -3,7 +3,7 @@ template struct A { - friend int foo(); // { dg-error "14:new declaration" } + friend int foo(); // { dg-error "14:ambiguating new declaration" } }; -void foo() { A<0> a; } // { dg-error "6:ambiguates old declaration" } +void foo() { A<0> a; } // { dg-message "6:old declaration" } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash42.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash42.C index 8777ef82cf0..4b34a520f66 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash42.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash42.C @@ -1,6 +1,6 @@ // { dg-do assemble } // GROUPS passed old-abort -int fn();// { dg-error "" } ambiguates.* +int fn();// { dg-message "" } ambiguates.* int x; int& fn() {// { dg-error "" } new decl.* return x;} diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C index 6db818aa102..1318ea6e9fe 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C @@ -5,9 +5,9 @@ class A { public: - friend A f(A &a);// { dg-error "ambiguates" } + friend A f(A &a);// { dg-message "old declaration" } }; -A &f(A &a) {// { dg-error "new decl" } +A &f(A &a) {// { dg-error "new declaration" } std::cout << "Blah\n"; } // { dg-warning "no return statement" } diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash55.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash55.C index 8295962411a..3faa538253b 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash55.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash55.C @@ -1,6 +1,6 @@ // { dg-do compile } // GROUPS passed old-abort - extern int f(int); // { dg-error "ambiguates" } + extern int f(int); // { dg-message "old declaration" } int& f(int x) // { dg-error "new declaration" } { diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C index 229be93da7c..72397930367 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C @@ -1,7 +1,7 @@ // { dg-do assemble } struct X { void f (int = 4, char = 'r'); // { dg-error "previous specification" } - void g (int = 4, char = 'r'); // { dg-error "previous specification" } + void g (int = 4, char = 'r'); // { dg-message "previous specification" } }; void diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload5.C b/gcc/testsuite/g++.old-deja/g++.jason/overload5.C index 9280c9d5e0d..c1d53f3cee0 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/overload5.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/overload5.C @@ -1,5 +1,5 @@ // { dg-do assemble } // Testcase for simple overloading resolution. -int foo (); // { dg-error "" } +int foo (); // { dg-message "" } void foo (); // { dg-error "" } disallowed overload diff --git a/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C b/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C index 6fda9d27ac9..172a4410490 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C @@ -3,7 +3,7 @@ class A { public: A (const A& ccref); - friend A const re (const A& v1); // { dg-error "ambiguates" } + friend A const re (const A& v1); // { dg-message "old declaration" } }; A // const diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm8.C b/gcc/testsuite/g++.old-deja/g++.law/arm8.C index 8b82af9514f..dfc3b30d3ac 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/arm8.C +++ b/gcc/testsuite/g++.old-deja/g++.law/arm8.C @@ -7,7 +7,7 @@ // Date: Tue, 16 Mar 93 12:05:24 +0100 struct K { - void f( int *p = 0); // { dg-error "" } previous specification + void f( int *p = 0); // { dg-message "" } previous specification }; extern int * q; diff --git a/gcc/testsuite/g++.old-deja/g++.other/main1.C b/gcc/testsuite/g++.old-deja/g++.other/main1.C index c5cfe8b9eb0..de689f60fc1 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/main1.C +++ b/gcc/testsuite/g++.old-deja/g++.other/main1.C @@ -1,12 +1,12 @@ // { dg-do compile } -int main() // { dg-error "previous declaration" } +int main() // { dg-message "previous declaration" } { return 0; } -int main(int, const char**) // { dg-error "conflicts" } +int main(int, const char**) // { dg-error "conflicting" } { return 0; }