In modules we can get an OVERLOAD around a non-function, so let's tail
recurse instead of falling through. As a result we start printing the
template header in this testcase.
gcc/cp/ChangeLog:
* error.cc (dump_decl) [OVERLOAD]: Recurse on single case.
gcc/testsuite/ChangeLog:
* g++.dg/warn/pr61945.C: Adjust diagnostic.
break;
}
- /* If there's only one function, just treat it like an ordinary
- FUNCTION_DECL. */
- t = OVL_FIRST (t);
- /* Fall through. */
+ /* If there's only one function, dump that. */
+ return dump_decl (pp, OVL_FIRST (t), flags);
case FUNCTION_DECL:
if (! DECL_LANG_SPECIFIC (t))
};
class B : A {
template <typename>
- void foo (); // { dg-message "by .B::foo\\(\\)." }
+ void foo (); // { dg-message "by .*B::foo\\(\\)." }
};