On 5/17/21 7:15 AM, Jonathan Wakely wrote:
The current diagnostic assumes the reference binding fails because the
reference is non-const, but it can also fail if the rvalue is volatile.

Use the current diagnostic for non-const cases, and a modified
diagnostic otherwise.

gcc/cp/ChangeLog:

        PR c++/100635
        * call.c (convert_like_internal): Print different diagnostic if
        the lvalue reference is const.

gcc/testsuite/ChangeLog:

        * g++.dg/conversion/pr100635.C: New test.

Tested powerpc64le-linux.

OK for trunk?

OK, thanks.

Jason

Reply via email to