PR c++/91889 - follow-up fix for DR 2352.
authorMarek Polacek <polacek@redhat.com>
Sat, 28 Sep 2019 15:35:37 +0000 (15:35 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Sat, 28 Sep 2019 15:35:37 +0000 (15:35 +0000)
commit406c9a1173f79dc0fb3231edb51690c1dd73f6a0
treec97288a968cae89f56b73fb3f74a970d5234bd01
parent7cf66a2dbe8017f59d2b28e8db3de8067efcc43e
PR c++/91889 - follow-up fix for DR 2352.

* call.c (involves_qualification_conversion_p): New function.
(direct_reference_binding): Build a ck_qual if the conversion
would involve a qualification conversion.
(convert_like_real): Strip the conversion created by the ck_qual
in direct_reference_binding.

* g++.dg/cpp0x/ref-bind3.C: Add dg-error.
* g++.dg/cpp0x/ref-bind4.C: New test.
* g++.dg/cpp0x/ref-bind5.C: New test.
* g++.dg/cpp0x/ref-bind6.C: New test.
* g++.old-deja/g++.pt/spec35.C: Revert earlier change.

From-SVN: r276251
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/ref-bind3.C
gcc/testsuite/g++.dg/cpp0x/ref-bind4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/ref-bind5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/ref-bind6.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/spec35.C