c++: Add some conversion sanity checking.
authorJason Merrill <jason@redhat.com>
Tue, 5 Jan 2021 21:56:44 +0000 (16:56 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 7 Jan 2021 21:05:09 +0000 (16:05 -0500)
commit4d65a07d54bd9371475648f7de9d4b6a01238813
tree46ff8c9f26c4e7c33581fe5095f936d891205cfe
parentb7c3f201be582553f9e3506536aa406bbd7ee71c
c++: Add some conversion sanity checking.

Another change I was working on revealed that for complex numbers we were
building a ck_identity with build_conv, leading to the wrong active member
in the union being set.  Rather than add another enumeration of the
appropriate conversion codes, I factored that out.

gcc/cp/ChangeLog:

* call.c (has_next): Factor out from...
(next_conversion): ...here.
(strip_standard_conversion): And here.
(is_subseq): And here.
(build_conv): Check it.
(standard_conversion): Don't call build_conv
for ck_identity.
gcc/cp/call.c