aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-05-23 15:13:18 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-05-23 15:13:18 +0100
commitaa573a6a3e165632103f2f8defb9768106db6a61 (patch)
tree266886fa0da1ec2329d0dbbe73b11e45561df137 /gcc/config.gcc
parent7dbab5dc84e3782fe6f366a985e507e2ea2726d2 (diff)
downloadgcc-aa573a6a3e165632103f2f8defb9768106db6a61.zip
gcc-aa573a6a3e165632103f2f8defb9768106db6a61.tar.gz
gcc-aa573a6a3e165632103f2f8defb9768106db6a61.tar.bz2
Make any_cast compare typeinfo as well as function pointers
It's possible for the function pointer comparison to fail even though the type is correct, because the function could be defined multiple times with different addresses when shared libraries are in use. Retain the function pointer check for the common case where the check succeeds, but compare typeinfo (if RTTI is enabled) if the first check fails. * include/experimental/any (__any_caster): Use RTTI if comparing addresses fails, to support non-unique addresses in shared libraries. * include/std/any (__any_caster): Likewise. From-SVN: r271557
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions