diff options
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f4806828cc4..ace340eeb3f 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1640,13 +1640,20 @@ void print_candidates (tree fns) { tree fn; + tree f; const char *str = "candidates are:"; - for (fn = fns; fn != NULL_TREE; fn = TREE_CHAIN (fn)) + if (is_overloaded_fn (fns)) + { + for (f = fns; f; f = OVL_NEXT (f)) + { + error ("%s %+#D", str, OVL_CURRENT (f)); + str = " "; + } + } + else for (fn = fns; fn != NULL_TREE; fn = TREE_CHAIN (fn)) { - tree f; - for (f = TREE_VALUE (fn); f; f = OVL_NEXT (f)) error ("%s %+#D", str, OVL_CURRENT (f)); str = " "; |