Skip to content
Snippets Groups Projects
Commit 42e9f80b authored by Jason Merrill's avatar Jason Merrill
Browse files

c++: Better diagnostic in converted const expr.

This improves the diagnostic from

error: could not convert ‘((A<>*)(void)0)->A<>::e’ from
       ‘<unresolved overloaded function type>’ to ‘bool’

to

error: cannot convert ‘A<>::e’ from type ‘void (A<>::)()’ to type ‘bool’

gcc/cp/ChangeLog
2020-05-11  Jason Merrill  <jason@redhat.com>

	* call.c (implicit_conversion_error): Split out from...
	(perform_implicit_conversion_flags): ...here.
	(build_converted_constant_expr_internal): Use it.
parent f981395c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment