c++: Fix missing SFINAE when binding a bit-field to a reference (PR 93729)
authorPatrick Palka <ppalka@redhat.com>
Tue, 3 Mar 2020 17:27:33 +0000 (12:27 -0500)
committerPatrick Palka <ppalka@redhat.com>
Sun, 8 Mar 2020 14:45:46 +0000 (10:45 -0400)
commit5e1b4e60c1823115ba7ff0e8c4b35f6058ad9969
tree6d2974b307e75eec1618d4b7fe454d0cf6399433
parentff0a62841e27b838f17a9d6253d131206072df6f
c++: Fix missing SFINAE when binding a bit-field to a reference (PR 93729)

We are unconditionally emitting an error here, without first checking complain.

gcc/cp/ChangeLog:

PR c++/93729
* call.c (convert_like_real): Check complain before emitting an error
about binding a bit-field to a reference.

gcc/testsuite/ChangeLog:

PR c++/93729
* g++.dg/concepts/pr93729.C: New test.
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/concepts/pr93729.C [new file with mode: 0644]