From 3784b33cd1260c128a7a9a5975bb13d7905369b8 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 12 May 2010 13:34:55 -0400 Subject: [PATCH] re PR c++/20669 (Template candidates not listed in error message.) PR c++/20669 * call.c (add_template_candidate_real): If deduction fails, still add the template as a non-viable candidate. (equal_functions): Handle template candidates. (print_z_candidate): Likewise. (print_z_candidates): Likewise. (build_new_function_call): Likewise. From-SVN: r159335 --- gcc/cp/ChangeLog | 8 +++ gcc/cp/call.c | 30 +++++---- gcc/testsuite/ChangeLog | 64 +++++++++++++++++++ gcc/testsuite/g++.dg/conversion/op1.C | 2 +- gcc/testsuite/g++.dg/cpp0x/nullptr15.C | 2 +- gcc/testsuite/g++.dg/cpp0x/pr31431-2.C | 2 +- gcc/testsuite/g++.dg/cpp0x/pr31431.C | 2 +- gcc/testsuite/g++.dg/cpp0x/temp_default2.C | 2 +- gcc/testsuite/g++.dg/cpp0x/trailing4.C | 2 +- gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C | 2 +- gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C | 2 +- gcc/testsuite/g++.dg/cpp0x/variadic-throw.C | 1 + gcc/testsuite/g++.dg/cpp0x/variadic35.C | 2 +- gcc/testsuite/g++.dg/cpp0x/vt-35147.C | 2 +- gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C | 1 + gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C | 2 +- gcc/testsuite/g++.dg/ext/visibility/anon8.C | 2 +- gcc/testsuite/g++.dg/ext/vla2.C | 2 +- gcc/testsuite/g++.dg/other/pr28114.C | 2 +- gcc/testsuite/g++.dg/other/ptrmem10.C | 2 +- gcc/testsuite/g++.dg/other/ptrmem11.C | 2 +- gcc/testsuite/g++.dg/overload/unknown1.C | 2 +- gcc/testsuite/g++.dg/parse/template7.C | 2 +- gcc/testsuite/g++.dg/parse/typename7.C | 4 +- gcc/testsuite/g++.dg/template/conv11.C | 2 +- gcc/testsuite/g++.dg/template/copy1.C | 4 +- gcc/testsuite/g++.dg/template/deduce3.C | 2 +- .../g++.dg/template/dependent-expr5.C | 4 +- gcc/testsuite/g++.dg/template/friend.C | 2 +- gcc/testsuite/g++.dg/template/incomplete2.C | 2 +- gcc/testsuite/g++.dg/template/local4.C | 2 +- gcc/testsuite/g++.dg/template/local6.C | 4 +- gcc/testsuite/g++.dg/template/operator10.C | 1 + gcc/testsuite/g++.dg/template/overload6.C | 2 +- gcc/testsuite/g++.dg/template/ptrmem2.C | 2 +- gcc/testsuite/g++.dg/template/ptrmem20.C | 2 +- gcc/testsuite/g++.dg/template/ptrmem8.C | 2 +- gcc/testsuite/g++.dg/template/sfinae2.C | 2 +- gcc/testsuite/g++.dg/template/ttp25.C | 6 +- gcc/testsuite/g++.dg/template/unify10.C | 8 +-- gcc/testsuite/g++.dg/template/unify11.C | 2 +- gcc/testsuite/g++.dg/template/unify6.C | 2 +- gcc/testsuite/g++.dg/template/unify7.C | 2 +- gcc/testsuite/g++.dg/template/unify9.C | 2 +- gcc/testsuite/g++.dg/template/varmod1.C | 2 +- .../g++.old-deja/g++.brendan/crash56.C | 2 +- .../g++.old-deja/g++.law/operators32.C | 4 +- gcc/testsuite/g++.old-deja/g++.pt/crash28.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/crash60.C | 2 +- .../g++.old-deja/g++.pt/explicit38.C | 2 +- .../g++.old-deja/g++.pt/explicit39.C | 2 +- .../g++.old-deja/g++.pt/explicit41.C | 2 +- .../g++.old-deja/g++.pt/explicit67.C | 4 +- .../g++.old-deja/g++.pt/explicit77.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/expr2.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/overload7.C | 1 + gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C | 4 +- gcc/testsuite/g++.old-deja/g++.pt/spec5.C | 4 +- gcc/testsuite/g++.old-deja/g++.pt/spec6.C | 4 +- gcc/testsuite/g++.old-deja/g++.pt/t24.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/unify4.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/unify6.C | 2 +- gcc/testsuite/g++.old-deja/g++.pt/unify8.C | 4 +- .../g++.old-deja/g++.robertl/eb119.C | 2 +- gcc/testsuite/g++.old-deja/g++.robertl/eb79.C | 1 + gcc/testsuite/g++.old-deja/g++.robertl/eb98.C | 2 +- libstdc++-v3/ChangeLog | 7 ++ .../testsuite/20_util/auto_ptr/assign_neg.cc | 1 + .../20_util/unique_ptr/assign/assign_neg.cc | 3 +- .../20_util/weak_ptr/comparison/cmp_neg.cc | 9 +++ 70 files changed, 188 insertions(+), 85 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 97dcc8d7aec..5f0569ad07b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,13 @@ 2010-05-12 Jason Merrill + PR c++/20669 + * call.c (add_template_candidate_real): If deduction fails, still + add the template as a non-viable candidate. + (equal_functions): Handle template candidates. + (print_z_candidate): Likewise. + (print_z_candidates): Likewise. + (build_new_function_call): Likewise. + * cp-tree.h (LOOKUP_LIST_ONLY): New. * call.c (add_candidates): Enforce it. (build_new_method_call): Try non-list ctor if no viable list ctor. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index c618b2938af..dccb1d4fbfe 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -2508,11 +2508,11 @@ add_template_candidate_real (struct z_candidate **candidates, tree tmpl, return_type, strict, flags); if (i != 0) - return NULL; + goto fail; fn = instantiate_template (tmpl, targs, tf_none); if (fn == error_mark_node) - return NULL; + goto fail; /* In [class.copy]: @@ -2541,7 +2541,7 @@ add_template_candidate_real (struct z_candidate **candidates, tree tmpl, tree arg_types = FUNCTION_FIRST_USER_PARMTYPE (fn); if (arg_types && same_type_p (TYPE_MAIN_VARIANT (TREE_VALUE (arg_types)), ctype)) - return NULL; + goto fail; } if (obj != NULL_TREE) @@ -2575,6 +2575,9 @@ add_template_candidate_real (struct z_candidate **candidates, tree tmpl, cand->template_decl = DECL_TEMPLATE_INFO (fn); return cand; + fail: + return add_candidate (candidates, tmpl, first_arg, arglist, nargs, NULL, + access_path, conversion_path, 0); } @@ -2607,10 +2610,10 @@ add_template_conv_candidate (struct z_candidate **candidates, tree tmpl, } /* The CANDS are the set of candidates that were considered for - overload resolution. Return the set of viable candidates. If none - of the candidates were viable, set *ANY_VIABLE_P to true. STRICT_P - is true if a candidate should be considered viable only if it is - strictly viable. */ + overload resolution. Return the set of viable candidates, or CANDS + if none are viable. If any of the candidates were viable, set + *ANY_VIABLE_P to true. STRICT_P is true if a candidate should be + considered viable only if it is strictly viable. */ static struct z_candidate* splice_viable (struct z_candidate *cands, @@ -2675,6 +2678,10 @@ build_this (tree obj) static inline int equal_functions (tree fn1, tree fn2) { + if (TREE_CODE (fn1) != TREE_CODE (fn2)) + return 0; + if (TREE_CODE (fn1) == TEMPLATE_DECL) + return fn1 == fn2; if (DECL_LOCAL_FUNCTION_P (fn1) || DECL_LOCAL_FUNCTION_P (fn2) || DECL_EXTERN_C_FUNCTION_P (fn1)) return decls_match (fn1, fn2); @@ -2710,7 +2717,7 @@ print_z_candidate (const char *msgstr, struct z_candidate *candidate) inform (input_location, "%s %T ", msgstr, candidate->fn); else if (candidate->viable == -1) inform (input_location, "%s %+#D ", msgstr, candidate->fn); - else if (DECL_DELETED_FN (candidate->fn)) + else if (DECL_DELETED_FN (STRIP_TEMPLATE (candidate->fn))) inform (input_location, "%s %+#D ", msgstr, candidate->fn); else inform (input_location, "%s %+#D", msgstr, candidate->fn); @@ -2750,12 +2757,12 @@ print_z_candidates (struct z_candidate *candidates) { tree fn = cand1->fn; /* Skip builtin candidates and conversion functions. */ - if (TREE_CODE (fn) != FUNCTION_DECL) + if (!DECL_P (fn)) continue; cand2 = &cand1->next; while (*cand2) { - if (TREE_CODE ((*cand2)->fn) == FUNCTION_DECL + if (DECL_P ((*cand2)->fn) && equal_functions (fn, (*cand2)->fn)) *cand2 = (*cand2)->next; else @@ -3167,7 +3174,8 @@ build_new_function_call (tree fn, VEC(tree,gc) **args, bool koenig_p, { if (complain & tf_error) { - if (!any_viable_p && candidates && ! candidates->next) + if (!any_viable_p && candidates && ! candidates->next + && (TREE_CODE (candidates->fn) == FUNCTION_DECL)) return cp_build_function_call_vec (candidates->fn, args, complain); if (TREE_CODE (fn) == TEMPLATE_ID_EXPR) fn = TREE_OPERAND (fn, 0); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f0f5c2390a9..a3200c94404 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,69 @@ 2010-05-12 Jason Merrill + * g++.dg/conversion/op1.C: Expect template candidate message. + * g++.dg/cpp0x/nullptr15.C: Likewise. + * g++.dg/cpp0x/pr31431-2.C: Likewise. + * g++.dg/cpp0x/pr31431.C: Likewise. + * g++.dg/cpp0x/temp_default2.C: Likewise. + * g++.dg/cpp0x/trailing4.C: Likewise. + * g++.dg/cpp0x/variadic-ex3.C: Likewise. + * g++.dg/cpp0x/variadic-ex4.C: Likewise. + * g++.dg/cpp0x/variadic-throw.C: Likewise. + * g++.dg/cpp0x/variadic35.C: Likewise. + * g++.dg/cpp0x/vt-35147.C: Likewise. + * g++.dg/cpp0x/vt-37737-1.C: Likewise. + * g++.dg/cpp0x/vt-37737-2.C: Likewise. + * g++.dg/ext/visibility/anon8.C: Likewise. + * g++.dg/ext/vla2.C: Likewise. + * g++.dg/other/pr28114.C: Likewise. + * g++.dg/other/ptrmem10.C: Likewise. + * g++.dg/other/ptrmem11.C: Likewise. + * g++.dg/overload/unknown1.C: Likewise. + * g++.dg/parse/template7.C: Likewise. + * g++.dg/parse/typename7.C: Likewise. + * g++.dg/template/conv11.C: Likewise. + * g++.dg/template/copy1.C: Likewise. + * g++.dg/template/deduce3.C: Likewise. + * g++.dg/template/dependent-expr5.C: Likewise. + * g++.dg/template/friend.C: Likewise. + * g++.dg/template/incomplete2.C: Likewise. + * g++.dg/template/local4.C: Likewise. + * g++.dg/template/local6.C: Likewise. + * g++.dg/template/operator10.C: Likewise. + * g++.dg/template/overload6.C: Likewise. + * g++.dg/template/ptrmem2.C: Likewise. + * g++.dg/template/ptrmem20.C: Likewise. + * g++.dg/template/ptrmem8.C: Likewise. + * g++.dg/template/sfinae2.C: Likewise. + * g++.dg/template/ttp25.C: Likewise. + * g++.dg/template/unify10.C: Likewise. + * g++.dg/template/unify11.C: Likewise. + * g++.dg/template/unify6.C: Likewise. + * g++.dg/template/unify7.C: Likewise. + * g++.dg/template/unify9.C: Likewise. + * g++.dg/template/varmod1.C: Likewise. + * g++.old-deja/g++.brendan/crash56.C: Likewise. + * g++.old-deja/g++.law/operators32.C: Likewise. + * g++.old-deja/g++.pt/crash28.C: Likewise. + * g++.old-deja/g++.pt/crash60.C: Likewise. + * g++.old-deja/g++.pt/explicit38.C: Likewise. + * g++.old-deja/g++.pt/explicit39.C: Likewise. + * g++.old-deja/g++.pt/explicit41.C: Likewise. + * g++.old-deja/g++.pt/explicit67.C: Likewise. + * g++.old-deja/g++.pt/explicit77.C: Likewise. + * g++.old-deja/g++.pt/expr2.C: Likewise. + * g++.old-deja/g++.pt/overload7.C: Likewise. + * g++.old-deja/g++.pt/ptrmem6.C: Likewise. + * g++.old-deja/g++.pt/spec5.C: Likewise. + * g++.old-deja/g++.pt/spec6.C: Likewise. + * g++.old-deja/g++.pt/t24.C: Likewise. + * g++.old-deja/g++.pt/unify4.C: Likewise. + * g++.old-deja/g++.pt/unify6.C: Likewise. + * g++.old-deja/g++.pt/unify8.C: Likewise. + * g++.old-deja/g++.robertl/eb119.C: Likewise. + * g++.old-deja/g++.robertl/eb79.C: Likewise. + * g++.old-deja/g++.robertl/eb98.C: Likewise. + * g++.dg/cpp0x/initlist32.C: New. * g++.dg/template/conv11.C: New. diff --git a/gcc/testsuite/g++.dg/conversion/op1.C b/gcc/testsuite/g++.dg/conversion/op1.C index 990cdaa093b..65b925a4d61 100644 --- a/gcc/testsuite/g++.dg/conversion/op1.C +++ b/gcc/testsuite/g++.dg/conversion/op1.C @@ -1,7 +1,7 @@ class C { template - operator U(); + operator U(); // { dg-message "candidate" } }; int fn (C c) diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C index 4572c535d4f..abb45f4e937 100644 --- a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C @@ -10,7 +10,7 @@ template inline typename tType_equal::type type_equal(U) { } -template T* g( T* t ); +template T* g( T* t ); // { dg-message "candidate" } void test_g() { diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C index 2f74e38ca3b..59e1afeab25 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C @@ -1,5 +1,5 @@ // { dg-options "-std=gnu++0x" } -template void foo(); +template void foo(); // { dg-message "candidate" } void bar() { diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431.C b/gcc/testsuite/g++.dg/cpp0x/pr31431.C index 061dab0a601..b150a047f8c 100644 --- a/gcc/testsuite/g++.dg/cpp0x/pr31431.C +++ b/gcc/testsuite/g++.dg/cpp0x/pr31431.C @@ -1,5 +1,5 @@ // { dg-options "-std=gnu++0x" } -template void foo(); +template void foo(); // { dg-message "candidate" } void bar() { diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C index f7f22284a62..5a9cbe03e74 100644 --- a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C +++ b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C @@ -1,7 +1,7 @@ // { dg-options "-std=c++0x" } template -void f(T t = 0, U u = 0); +void f(T t = 0, U u = 0); // { dg-message "candidate" } void g() { diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing4.C b/gcc/testsuite/g++.dg/cpp0x/trailing4.C index dc7e35aabaa..247efd4b56c 100644 --- a/gcc/testsuite/g++.dg/cpp0x/trailing4.C +++ b/gcc/testsuite/g++.dg/cpp0x/trailing4.C @@ -5,7 +5,7 @@ template auto f(T,U) -> decltype(T() + U()) { return T() + U(); } -template void g(T){} +template void g(T){} // { dg-message "candidate" } int main() { g(f); } // { dg-error "no matching function" } diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C index 8b8ca9e312d..60c47176d00 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C @@ -1,5 +1,5 @@ // { dg-options "-std=gnu++0x" } -template X f(Y); +template X f(Y); // { dg-message "candidate" } void g() { int i = f(5.6); diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C index 69866dcb13d..b8aec1f5140 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C @@ -1,5 +1,5 @@ // { dg-options "-std=gnu++0x" } -template X f(Y,Z); +template X f(Y,Z); // { dg-message "candidate" } template void f2(); void g() { diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C b/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C index ee85bf2a569..8363c2a73f9 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C @@ -1,4 +1,5 @@ // { dg-options -std=c++0x } +// { dg-prune-output "note" } // PR c++/33509 template struct pair { diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic35.C b/gcc/testsuite/g++.dg/cpp0x/variadic35.C index cd6ba2b0a0c..a85771d1595 100644 --- a/gcc/testsuite/g++.dg/cpp0x/variadic35.C +++ b/gcc/testsuite/g++.dg/cpp0x/variadic35.C @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } template -void get_ith(const Args&... args); +void get_ith(const Args&... args); // { dg-message "candidate" } void f() { diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35147.C b/gcc/testsuite/g++.dg/cpp0x/vt-35147.C index 67f282ef9c3..9008180799b 100644 --- a/gcc/testsuite/g++.dg/cpp0x/vt-35147.C +++ b/gcc/testsuite/g++.dg/cpp0x/vt-35147.C @@ -1,7 +1,7 @@ // { dg-options "-std=c++0x" } template - _Tp&& forward(_Tp&& __t) { return __t; } + _Tp&& forward(_Tp&& __t) { return __t; } // { dg-message "candidate" } void f(...); diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C b/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C index 32ea22db278..de11b1651b4 100644 --- a/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C +++ b/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C @@ -1,4 +1,5 @@ // { dg-options "-std=c++0x" } +// { dg-prune-output "note" } void f() { } diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C index 11547e5e249..16df69bd892 100644 --- a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C +++ b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C @@ -1,7 +1,7 @@ // { dg-options "-std=c++0x" } template -void f() +void f() // { dg-message "candidate" } { f(); // { dg-error "no matching" } } diff --git a/gcc/testsuite/g++.dg/ext/visibility/anon8.C b/gcc/testsuite/g++.dg/ext/visibility/anon8.C index 827cc221741..b0d3849b26f 100644 --- a/gcc/testsuite/g++.dg/ext/visibility/anon8.C +++ b/gcc/testsuite/g++.dg/ext/visibility/anon8.C @@ -2,7 +2,7 @@ // { dg-do compile } template -void call () +void call () // { dg-message "candidate" } { fn (); } diff --git a/gcc/testsuite/g++.dg/ext/vla2.C b/gcc/testsuite/g++.dg/ext/vla2.C index c17dc860910..5e37f8a5fc2 100644 --- a/gcc/testsuite/g++.dg/ext/vla2.C +++ b/gcc/testsuite/g++.dg/ext/vla2.C @@ -8,7 +8,7 @@ // errors. template -char* begin(char (&a) [N] ); +char* begin(char (&a) [N] ); // { dg-message "candidate" } void bar(int i) { diff --git a/gcc/testsuite/g++.dg/other/pr28114.C b/gcc/testsuite/g++.dg/other/pr28114.C index e370f717c3a..d54fec96085 100644 --- a/gcc/testsuite/g++.dg/other/pr28114.C +++ b/gcc/testsuite/g++.dg/other/pr28114.C @@ -1,7 +1,7 @@ // Test to make sure we do not ICE on this invalid program. -template void foo(struct {}*); // { dg-error "" } +template void foo(struct {}*); // { dg-message "" } void bar() { diff --git a/gcc/testsuite/g++.dg/other/ptrmem10.C b/gcc/testsuite/g++.dg/other/ptrmem10.C index 4b8c40ac8ec..53d5c85a807 100644 --- a/gcc/testsuite/g++.dg/other/ptrmem10.C +++ b/gcc/testsuite/g++.dg/other/ptrmem10.C @@ -3,7 +3,7 @@ template static -void foo(void *obj) +void foo(void *obj) // { dg-message "candidate" } { C *p = static_cast(obj); (p->*M)(); diff --git a/gcc/testsuite/g++.dg/other/ptrmem11.C b/gcc/testsuite/g++.dg/other/ptrmem11.C index a850c55c40a..c1c8677c9dc 100644 --- a/gcc/testsuite/g++.dg/other/ptrmem11.C +++ b/gcc/testsuite/g++.dg/other/ptrmem11.C @@ -5,7 +5,7 @@ struct A {}; template int -foo(A* q) +foo(A* q) // { dg-message "candidate" } { return q->*p; } diff --git a/gcc/testsuite/g++.dg/overload/unknown1.C b/gcc/testsuite/g++.dg/overload/unknown1.C index f34d79ffc08..61b60b063cd 100644 --- a/gcc/testsuite/g++.dg/overload/unknown1.C +++ b/gcc/testsuite/g++.dg/overload/unknown1.C @@ -2,7 +2,7 @@ void foo(void); int foo(int); -template void bar(T f); +template void bar(T f); // { dg-message "candidate" } void baz() { bar(foo); // { dg-error "" } diff --git a/gcc/testsuite/g++.dg/parse/template7.C b/gcc/testsuite/g++.dg/parse/template7.C index b13e3eccde4..e07d5f85d8f 100644 --- a/gcc/testsuite/g++.dg/parse/template7.C +++ b/gcc/testsuite/g++.dg/parse/template7.C @@ -1,4 +1,4 @@ template -void f(); +void f(); // { dg-message "candidate" } void g() { f<(3, 2)>(); } // { dg-error "" } diff --git a/gcc/testsuite/g++.dg/parse/typename7.C b/gcc/testsuite/g++.dg/parse/typename7.C index 3cee4bac68b..0ac53112126 100644 --- a/gcc/testsuite/g++.dg/parse/typename7.C +++ b/gcc/testsuite/g++.dg/parse/typename7.C @@ -7,8 +7,8 @@ struct A { - template void foo(int); - template void bar(T t) { + template void foo(int); // { dg-message "candidate" } + template void bar(T t) { // { dg-message "candidate" } this->foo(t); } // { dg-error "expected|parse error|no matching" } template void bad(T t) { foo(t); } // { dg-error "expected|parse error|no matching" } diff --git a/gcc/testsuite/g++.dg/template/conv11.C b/gcc/testsuite/g++.dg/template/conv11.C index 846b852f493..de41d6a2122 100644 --- a/gcc/testsuite/g++.dg/template/conv11.C +++ b/gcc/testsuite/g++.dg/template/conv11.C @@ -1,7 +1,7 @@ int i; struct A { - template operator T&() { return i; } + template operator T&() { return i; } // { dg-message "candidate" } }; int main() diff --git a/gcc/testsuite/g++.dg/template/copy1.C b/gcc/testsuite/g++.dg/template/copy1.C index e56545332ae..bec506dd991 100644 --- a/gcc/testsuite/g++.dg/template/copy1.C +++ b/gcc/testsuite/g++.dg/template/copy1.C @@ -6,8 +6,8 @@ struct A { - A(A&); // { dg-message "candidate" } - template A(T); + A(A&); // { dg-message "note" } + template A(T); // { dg-message "candidate" } }; A a = 0; // { dg-error "no matching function" } diff --git a/gcc/testsuite/g++.dg/template/deduce3.C b/gcc/testsuite/g++.dg/template/deduce3.C index d6d68a81bc7..fbf41e0e328 100644 --- a/gcc/testsuite/g++.dg/template/deduce3.C +++ b/gcc/testsuite/g++.dg/template/deduce3.C @@ -1,5 +1,5 @@ template -void f(int, T (*)() = 0); +void f(int, T (*)() = 0); // { dg-message "candidate" } void g() { typedef int A[2]; diff --git a/gcc/testsuite/g++.dg/template/dependent-expr5.C b/gcc/testsuite/g++.dg/template/dependent-expr5.C index db67273b362..b36d38233e9 100644 --- a/gcc/testsuite/g++.dg/template/dependent-expr5.C +++ b/gcc/testsuite/g++.dg/template/dependent-expr5.C @@ -4,9 +4,9 @@ // contributed by Alexandre Oliva // inspired in the failure reported in Red Hat bugzilla #168260. -template void bind(F f) {} +template void bind(F f) {} // { dg-message "note" } -template void bindm(F f) {} +template void bindm(F f) {} // { dg-message "note" } template void bindm(F (T::*f)(void)) {} // { dg-message "note" } template void bindn(F f) {} diff --git a/gcc/testsuite/g++.dg/template/friend.C b/gcc/testsuite/g++.dg/template/friend.C index 5e9abb0b52a..ac22f2ffb2d 100644 --- a/gcc/testsuite/g++.dg/template/friend.C +++ b/gcc/testsuite/g++.dg/template/friend.C @@ -7,7 +7,7 @@ extern ostream& cout; template struct s; template -ostream& operator<<(ostream &o, const typename s::t &x) +ostream& operator<<(ostream &o, const typename s::t &x) // { dg-message "note" } { return o; } diff --git a/gcc/testsuite/g++.dg/template/incomplete2.C b/gcc/testsuite/g++.dg/template/incomplete2.C index 23d393e99df..73b6c6fd64d 100644 --- a/gcc/testsuite/g++.dg/template/incomplete2.C +++ b/gcc/testsuite/g++.dg/template/incomplete2.C @@ -3,7 +3,7 @@ struct A; -template void foo(); +template void foo(); // { dg-message "candidate" } A a; // { dg-error "incomplete type" } diff --git a/gcc/testsuite/g++.dg/template/local4.C b/gcc/testsuite/g++.dg/template/local4.C index cfa37364975..e3044e993ee 100644 --- a/gcc/testsuite/g++.dg/template/local4.C +++ b/gcc/testsuite/g++.dg/template/local4.C @@ -1,6 +1,6 @@ // PR c++/17413 -template void foo() {} +template void foo() {} // { dg-message "candidate" } int main () { struct S {}; diff --git a/gcc/testsuite/g++.dg/template/local6.C b/gcc/testsuite/g++.dg/template/local6.C index 6c5e8ac7022..1fa39bc7a75 100644 --- a/gcc/testsuite/g++.dg/template/local6.C +++ b/gcc/testsuite/g++.dg/template/local6.C @@ -1,6 +1,6 @@ -template struct PCVector2 // { dg-message "candidate is" } +template struct PCVector2 // { dg-message "note" } { - template PCVector2(const PCVector2 &cv) ; + template PCVector2(const PCVector2 &cv) ; // { dg-message "candidate" } PCVector2 operator- (const PCVector2 &ov) const { diff --git a/gcc/testsuite/g++.dg/template/operator10.C b/gcc/testsuite/g++.dg/template/operator10.C index b17f49fa9f7..448b022905f 100644 --- a/gcc/testsuite/g++.dg/template/operator10.C +++ b/gcc/testsuite/g++.dg/template/operator10.C @@ -1,4 +1,5 @@ // PR c++/30535 +// { dg-prune-output "note" } struct A {}; diff --git a/gcc/testsuite/g++.dg/template/overload6.C b/gcc/testsuite/g++.dg/template/overload6.C index 478b466394a..fd868333447 100644 --- a/gcc/testsuite/g++.dg/template/overload6.C +++ b/gcc/testsuite/g++.dg/template/overload6.C @@ -4,7 +4,7 @@ // PR 21592:ICE // Origin: Volker Reichelt -template void unique(T,T); +template void unique(T,T); // { dg-message "note" } struct A { diff --git a/gcc/testsuite/g++.dg/template/ptrmem2.C b/gcc/testsuite/g++.dg/template/ptrmem2.C index 23a4ad9380b..848a6d9cca0 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem2.C +++ b/gcc/testsuite/g++.dg/template/ptrmem2.C @@ -7,7 +7,7 @@ struct A {}; -template T A::* Foo (); +template T A::* Foo (); // { dg-message "candidate" } void Baz () { diff --git a/gcc/testsuite/g++.dg/template/ptrmem20.C b/gcc/testsuite/g++.dg/template/ptrmem20.C index d98ef398c58..23488737a67 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem20.C +++ b/gcc/testsuite/g++.dg/template/ptrmem20.C @@ -8,7 +8,7 @@ struct B void foo(); }; -template void bar(); +template void bar(); // { dg-message "candidate" } void baz() { diff --git a/gcc/testsuite/g++.dg/template/ptrmem8.C b/gcc/testsuite/g++.dg/template/ptrmem8.C index e25b4084129..8585f835787 100644 --- a/gcc/testsuite/g++.dg/template/ptrmem8.C +++ b/gcc/testsuite/g++.dg/template/ptrmem8.C @@ -11,7 +11,7 @@ struct B struct D : B {}; -template int Get(); +template int Get(); // { dg-message "candidate" } int main () { diff --git a/gcc/testsuite/g++.dg/template/sfinae2.C b/gcc/testsuite/g++.dg/template/sfinae2.C index 89880a85f43..0b11ecc0f02 100644 --- a/gcc/testsuite/g++.dg/template/sfinae2.C +++ b/gcc/testsuite/g++.dg/template/sfinae2.C @@ -8,7 +8,7 @@ template struct cl { const static int value = T; }; -template void fn (char (*) [cl::value] = 0 ); +template void fn (char (*) [cl::value] = 0 ); // { dg-message "candidate" } void foo (void) { diff --git a/gcc/testsuite/g++.dg/template/ttp25.C b/gcc/testsuite/g++.dg/template/ttp25.C index 89153037913..23e5a7a7990 100644 --- a/gcc/testsuite/g++.dg/template/ttp25.C +++ b/gcc/testsuite/g++.dg/template/ttp25.C @@ -1,19 +1,19 @@ // { dg-do compile } template class C> -void f1(T, C<5>); +void f1(T, C<5>); // { dg-message "note" } template class C> void f2(C<5>, T); template class C> -void f3(C<5>, T); +void f3(C<5>, T); // { dg-message "note" } template struct metafun { typedef T type; }; template<> struct metafun { typedef int type; }; template::type> class C> -void f4(T, C<5>); +void f4(T, C<5>); // { dg-message "note" } template struct X {}; void g() { diff --git a/gcc/testsuite/g++.dg/template/unify10.C b/gcc/testsuite/g++.dg/template/unify10.C index b46c693e01f..7b19e1ebfe8 100644 --- a/gcc/testsuite/g++.dg/template/unify10.C +++ b/gcc/testsuite/g++.dg/template/unify10.C @@ -12,16 +12,16 @@ struct MyClass { }; template -void mFunction(void (CLASS::* method)()) {} +void mFunction(void (CLASS::* method)()) {} // { dg-message "candidate" } template -void cFunction(void (CLASS::* method)() const) {} +void cFunction(void (CLASS::* method)() const) {} // { dg-message "candidate" } template -void vFunction(void (CLASS::* method)() volatile) {} +void vFunction(void (CLASS::* method)() volatile) {} // { dg-message "candidate" } template -void cvFunction(void (CLASS::* method)() const volatile) {} +void cvFunction(void (CLASS::* method)() const volatile) {} // { dg-message "candidate" } int main() { mFunction(&MyClass::mMethod); diff --git a/gcc/testsuite/g++.dg/template/unify11.C b/gcc/testsuite/g++.dg/template/unify11.C index c8df94b31ca..a49f5c1b2d0 100644 --- a/gcc/testsuite/g++.dg/template/unify11.C +++ b/gcc/testsuite/g++.dg/template/unify11.C @@ -8,7 +8,7 @@ struct A template typename S::A -foo (S c, T t, U u) +foo (S c, T t, U u) // { dg-message "candidate" } { } diff --git a/gcc/testsuite/g++.dg/template/unify6.C b/gcc/testsuite/g++.dg/template/unify6.C index ee6a8ce0fdb..4e890fe50b3 100644 --- a/gcc/testsuite/g++.dg/template/unify6.C +++ b/gcc/testsuite/g++.dg/template/unify6.C @@ -8,7 +8,7 @@ template void Foo1 (T const *a) {a (1);} // #2 template T const *Foo2 (T *); -template void Foo3 (T *, T const * = 0); +template void Foo3 (T *, T const * = 0); // { dg-message "candidate" } void Bar () { diff --git a/gcc/testsuite/g++.dg/template/unify7.C b/gcc/testsuite/g++.dg/template/unify7.C index 3f7028b642f..23f61f3dcca 100644 --- a/gcc/testsuite/g++.dg/template/unify7.C +++ b/gcc/testsuite/g++.dg/template/unify7.C @@ -3,7 +3,7 @@ // PR c++/3518 template void Foo (const T &); -template void Baz (const T (*)()); +template void Baz (const T (*)()); // { dg-message "candidate" } int &f (); diff --git a/gcc/testsuite/g++.dg/template/unify9.C b/gcc/testsuite/g++.dg/template/unify9.C index 2439efb761c..1e16c432b8a 100644 --- a/gcc/testsuite/g++.dg/template/unify9.C +++ b/gcc/testsuite/g++.dg/template/unify9.C @@ -4,7 +4,7 @@ // Origin:Wolfgang Bangerth // PR 21799: deduction of cvqualifiers on member functions was wrong -template void f (T &, void (T::*)() ); +template void f (T &, void (T::*)() ); // { dg-message "candidate" } struct X { void g() const {} diff --git a/gcc/testsuite/g++.dg/template/varmod1.C b/gcc/testsuite/g++.dg/template/varmod1.C index 0747fe99587..c2c51c72173 100644 --- a/gcc/testsuite/g++.dg/template/varmod1.C +++ b/gcc/testsuite/g++.dg/template/varmod1.C @@ -1,6 +1,6 @@ // { dg-options "-w" } -template void foo(T); +template void foo(T); // { dg-message "candidate" } void bar() { diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C index 0932ca46659..5dc1a874903 100644 --- a/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C +++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash56.C @@ -292,7 +292,7 @@ SetLD::contains(const T& item) const } template int -operator==(const SetLD& a, const SetLD& b) +operator==(const SetLD& a, const SetLD& b) // { dg-message "note" } { if (a.length() != b.length()) return FALSE; diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators32.C b/gcc/testsuite/g++.old-deja/g++.law/operators32.C index 91de03ee8fc..8d5372c6c30 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/operators32.C +++ b/gcc/testsuite/g++.old-deja/g++.law/operators32.C @@ -7,7 +7,7 @@ // template -void ffree(long rows, T** array) +void ffree(long rows, T** array) // { dg-message "candidate" } { for( long i = 0; i < rows; i++ ) delete [] array[i]; // delete row @@ -21,7 +21,7 @@ return array = new T[size]; } template -T** allocate2d(long d1, long d2, T**& array) +T** allocate2d(long d1, long d2, T**& array) // { dg-message "note" } { if( allocate1d(d1, array) != 0 ) { diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash28.C b/gcc/testsuite/g++.old-deja/g++.pt/crash28.C index 09b5600c62d..23d0d2c76bd 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/crash28.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash28.C @@ -2,7 +2,7 @@ // { dg-options "" } template -inline unsigned int asize(ARRY &a) +inline unsigned int asize(ARRY &a) // { dg-message "candidate" } { return sizeof(a) / sizeof(a[0]); } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash60.C b/gcc/testsuite/g++.old-deja/g++.pt/crash60.C index 60f5c4d8c6f..fb9ca3cf121 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/crash60.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash60.C @@ -7,7 +7,7 @@ template< typename SID, class SDR > void k( SID sid, SDR* p, void (SDR::*) - ( typename SID::T ) ); + ( typename SID::T ) ); // { dg-message "candidate" } struct E { }; struct S { void f( int ); }; diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C index e83898f2cc6..35540240b93 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit38.C @@ -1,6 +1,6 @@ // { dg-do assemble } template -void f(int j); +void f(int j); // { dg-message "candidate" } void g() { diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C index a765d7fafc3..70c72d003ed 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit39.C @@ -1,6 +1,6 @@ // { dg-do assemble } template -void f(int i); +void f(int i); // { dg-message "candidate" } void g() { diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C index b6a7747857c..e04e814dcaa 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit41.C @@ -1,6 +1,6 @@ // { dg-do assemble } template -void f(int i); +void f(int i); // { dg-message "candidate" } void g() { diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C index f216a014169..534309f0c98 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit67.C @@ -9,9 +9,9 @@ void g(int); void g(double); template -void foo(); +void foo(); // { dg-message "note" } template -void foo(); +void foo(); // { dg-message "note" } void bar() { diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C index 3e2ac1d76a9..0df1f46dbdc 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit77.C @@ -7,7 +7,7 @@ template struct S : public S, S {}; template -void f(S, S); +void f(S, S); // { dg-message "candidate" } void g() { S<0, 0, 0> s0; diff --git a/gcc/testsuite/g++.old-deja/g++.pt/expr2.C b/gcc/testsuite/g++.old-deja/g++.pt/expr2.C index 22ee4c8b16a..881b906704b 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/expr2.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/expr2.C @@ -4,7 +4,7 @@ template struct S {}; template -void foo(S); +void foo(S); // { dg-message "candidate" } void bar() { diff --git a/gcc/testsuite/g++.old-deja/g++.pt/overload7.C b/gcc/testsuite/g++.old-deja/g++.pt/overload7.C index 827e3d80a7c..6f5dff0a2ff 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/overload7.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/overload7.C @@ -1,4 +1,5 @@ // { dg-do assemble } +// { dg-prune-output "note" } // Adapted from testcase by Corey Kosak diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C index 4c98b3df19d..51c5536c7d1 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C @@ -13,9 +13,9 @@ public: }; template -void g() {} +void g() {} // { dg-message "candidate" } template -void h() {} +void h() {} // { dg-message "candidate" } int main() { diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec5.C b/gcc/testsuite/g++.old-deja/g++.pt/spec5.C index 821880cc3a0..9aee75fdb21 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/spec5.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec5.C @@ -1,13 +1,13 @@ // { dg-do assemble } template -void f(T t1, T t2); +void f(T t1, T t2); // { dg-message "candidate" } template <> void f(int i, int j); template -void g(T t1, T t2) {} +void g(T t1, T t2) {} // { dg-message "candidate" } template void g(int i, int j); diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec6.C b/gcc/testsuite/g++.old-deja/g++.pt/spec6.C index 276e398262e..765dd8e7583 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/spec6.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/spec6.C @@ -3,7 +3,7 @@ struct S1 { template - void f(T t1, T t2); + void f(T t1, T t2); // { dg-message "candidate" } }; @@ -14,7 +14,7 @@ template struct S2 { template - void f(T t1, T t2); + void f(T t1, T t2); // { dg-message "candidate" } }; template <> diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t24.C b/gcc/testsuite/g++.old-deja/g++.pt/t24.C index c2c27199391..fe6281b9ca2 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/t24.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/t24.C @@ -1,7 +1,7 @@ // { dg-do assemble } // { dg-options "" } -template int f (X x, X y) { return 23; } +template int f (X x, X y) { return 23; } // { dg-message "candidate" } int foo () { return f (7); // { dg-error "" } diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify4.C b/gcc/testsuite/g++.old-deja/g++.pt/unify4.C index e4129eae96c..51bfaf48775 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/unify4.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify4.C @@ -1,5 +1,5 @@ // { dg-do assemble } -template void f (T); +template void f (T); // { dg-message "candidate" } void g (); void g (int); diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify6.C b/gcc/testsuite/g++.old-deja/g++.pt/unify6.C index feac3f7d95f..18a0553133d 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/unify6.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify6.C @@ -19,7 +19,7 @@ template<> void fn() {} // ok, specialize A template<> void fn() {} // ok, specialize A // now make sure we moan when we really should -template void foo(T const *){} +template void foo(T const *){} // { dg-message "candidate" } void f() { diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C index 92cd191deb0..a0cb738956d 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/unify8.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/unify8.C @@ -8,9 +8,9 @@ // overload resolution. -template void Foo (T const **); +template void Foo (T const **); // { dg-message "candidate" } template void Bar (T const * const *); -void Foo (int); // { dg-message "candidate" } +void Foo (int); // { dg-message "note" } void Foo (float); // { dg-message "note" } candidate void baz (int **p1) diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C index d011ae1c953..bb8892c7f61 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb119.C @@ -1,6 +1,6 @@ // { dg-do assemble } template -void f() +void f() // { dg-message "candidate" } { } diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C index 8d1c94d168f..1c1ad3e3067 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb79.C @@ -1,4 +1,5 @@ // { dg-do assemble } +// { dg-prune-output "note" } // Makes bogus x86 assembly code. #include diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C index 68404fe13fe..5fb4861a3a4 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb98.C @@ -5,7 +5,7 @@ template inline unsigned int - extent(T (&x)[Length]) + extent(T (&x)[Length]) // { dg-message "candidate" } { return Length; } diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 903f371fa62..ae20b119cf4 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2010-05-12 Jason Merrill + + * testsuite/20_util/auto_ptr/assign_neg.cc: Expect template + candidate messages. + * testsuite/20_util/unique_ptr/assign/assign_neg.cc: Likewise. + * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise. + 2010-05-11 Silvius Rus PR libstdc++/43259 diff --git a/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc b/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc index b4b9eb910a6..1f6e67394e9 100644 --- a/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc +++ b/libstdc++-v3/testsuite/20_util/auto_ptr/assign_neg.cc @@ -47,4 +47,5 @@ main() return 0; } // { dg-error "candidates" "" { target *-*-* } 134 } +// { dg-error "note" "" { target *-*-* } 152 } // { dg-error "::auto_ptr" "" { target *-*-* } 262 } diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc index 525364b3412..4aa93b91d91 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/assign/assign_neg.cc @@ -52,7 +52,8 @@ test03() // { dg-error "deleted function" "" { target *-*-* } 357 } // { dg-error "used here" "" { target *-*-* } 42 } // { dg-error "no matching" "" { target *-*-* } 48 } -// { dg-warning "candidates are" "" { target *-*-* } 130 } +// { dg-warning "note" "" { target *-*-* } 130 } +// { dg-warning "note" "" { target *-*-* } 134 } // { dg-warning "note" "" { target *-*-* } 123 } // { dg-warning "note" "" { target *-*-* } 118 } // { dg-warning "note" "" { target *-*-* } 113 } diff --git a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc index 93aceb305eb..6165db09df7 100644 --- a/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc +++ b/libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc @@ -40,3 +40,12 @@ main() test01(); return 0; } + +// { dg-warning "note" "" { target *-*-* } 281 } +// { dg-warning "note" "" { target *-*-* } 407 } +// { dg-warning "note" "" { target *-*-* } 831 } +// { dg-warning "note" "" { target *-*-* } 511 } +// { dg-warning "note" "" { target *-*-* } 1005 } +// { dg-warning "note" "" { target *-*-* } 340 } +// { dg-warning "note" "" { target *-*-* } 290 } +// { dg-warning "note" "" { target *-*-* } 190 }