aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-cppbuiltin.cc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2022-09-26 10:21:38 -0400
committerMarek Polacek <polacek@redhat.com>2022-09-26 12:20:38 -0400
commitbe4b32b9ef69b86b662cb7511b48cd1048a55403 (patch)
treeb931de83ee678a47a7085e09152a6bacdf93adc1 /gcc/c-family/c-cppbuiltin.cc
parent099a66498bf7a40764002793eba66c881a251b76 (diff)
downloadgcc-be4b32b9ef69b86b662cb7511b48cd1048a55403.zip
gcc-be4b32b9ef69b86b662cb7511b48cd1048a55403.tar.gz
gcc-be4b32b9ef69b86b662cb7511b48cd1048a55403.tar.bz2
c++: Instantiate less when evaluating __is_convertible
Jon reported that evaluating __is_convertible in a test led to instantiating something ill-formed and so we failed to compile the test. __is_convertible doesn't and shouldn't need to instantiate so much, so let's limit it with a cp_unevaluated guard. Use a helper function to implement both built-ins. PR c++/106784 gcc/cp/ChangeLog: * method.cc (is_convertible_helper): New. (is_convertible): Use it. (is_nothrow_convertible): Likewise. gcc/testsuite/ChangeLog: * g++.dg/ext/is_convertible3.C: New test. * g++.dg/ext/is_nothrow_convertible3.C: New test.
Diffstat (limited to 'gcc/c-family/c-cppbuiltin.cc')
0 files changed, 0 insertions, 0 deletions