Commit a293ed6e by Paolo Carlini Committed by Paolo Carlini

re PR c++/57327 ('derived' is an ambiguous base class of 'base' diagnostic is backwards)

/cp
2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57327
	* pt.c (unify_no_common_base): Swap arg and parm arguments to inform.

/testsuite
2013-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57327
	* g++.dg/template/error50.C: New.

From-SVN: r199097
parent de4317cc
2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57327
* pt.c (unify_no_common_base): Swap arg and parm arguments to inform.
2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/10207
* parser.c (cp_parser_postfix_expression): Use cp_parser_braced_list
instead of cp_parser_initializer_list for compound-literals.
......
......@@ -5375,7 +5375,7 @@ unify_no_common_base (bool explain_p, enum template_base_result r,
{
case tbr_ambiguous_baseclass:
inform (input_location, " %qT is an ambiguous base class of %qT",
arg, parm);
parm, arg);
break;
default:
inform (input_location, " %qT is not derived from %qT", arg, parm);
......
2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/57327
* g++.dg/template/error50.C: New.
2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/10207
* g++.dg/ext/complit13.C: New.
......
// PR c++/57327
template<class T>
struct A {};
template<class T>
void f(A<T>&) {}
struct B : A<long> {};
struct C : A<char> {};
struct D : B, C {};
int main()
{
D d;
f(d); // { dg-error "no matching" }
} // { dg-message "'A<T>' is an ambiguous base" "" { target *-*-* } 18 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment