diff options
author | Jason Merrill <jason@redhat.com> | 2021-11-10 16:42:04 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2021-11-15 02:30:26 -0500 |
commit | 267318a2857a42922c3ca033dac4690172b17683 (patch) | |
tree | 4ea96e675ff964d102e803ef0466151b09c5dd73 /gcc/cppdefault.c | |
parent | adcfd2c45c3523d74279b5fcac1d7c6c34dd1382 (diff) | |
download | gcc-267318a2857a42922c3ca033dac4690172b17683.zip gcc-267318a2857a42922c3ca033dac4690172b17683.tar.gz gcc-267318a2857a42922c3ca033dac4690172b17683.tar.bz2 |
c++: constexpr virtual and vbase thunk
C++20 allows virtual functions to be constexpr. I don't think that calling
through a pointer to a vbase subobject is supposed to work in a constant
expression, since an object with virtual bases can't be constant, but the
call shouldn't ICE.
gcc/cp/ChangeLog:
* constexpr.c (cxx_eval_thunk_call): Error instead of ICE
on vbase thunk to constexpr function.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/constexpr-virtual20.C: New test.
Diffstat (limited to 'gcc/cppdefault.c')
0 files changed, 0 insertions, 0 deletions