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

c++: improve reference binding diagnostic [PR91849]

Here we were complaining about binding the lvalue reference to the rvalue
result of converting from float to int, but didn't mention that conversion.
Talk about the type of the initializer instead.

gcc/cp/ChangeLog:

	PR c++/91849
	* call.c (convert_like_internal): Improve reference diagnostic.

gcc/testsuite/ChangeLog:

	PR c++/91849
	* g++.dg/conversion/pr66211.C: Adjust diagnostic.
	* g++.dg/conversion/ref7.C: New test.
parent 94279aac
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