diff options
author | Marek Polacek <polacek@redhat.com> | 2020-01-24 18:08:58 -0500 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2020-01-25 14:26:07 -0500 |
commit | de0684bf3f72c1e7a29704bce215ab40bcb84bb6 (patch) | |
tree | 0c6b84992dd87dd390731bee7c92d1c38438af14 /gcc/tree.c | |
parent | 10be08aa276916b4dc286abc269ed0a175f033dd (diff) | |
download | gcc-de0684bf3f72c1e7a29704bce215ab40bcb84bb6.zip gcc-de0684bf3f72c1e7a29704bce215ab40bcb84bb6.tar.gz gcc-de0684bf3f72c1e7a29704bce215ab40bcb84bb6.tar.bz2 |
c++: Poor diagnostic for dynamic_cast in constexpr context [PR93414]
I neglected to add a proper diagnostic for the reference dynamic_cast
case when the operand of a dynamic_cast doesn't refer to a public base
of Derived, resulting in suboptimal error message
error: call to non-'constexpr' function 'void* __cxa_bad_cast()'
2020-01-25 Marek Polacek <polacek@redhat.com>
PR c++/93414 - poor diagnostic for dynamic_cast in constexpr context.
* constexpr.c (cxx_eval_dynamic_cast_fn): Add a reference
dynamic_cast diagnostic.
* g++.dg/cpp2a/constexpr-dynamic18.C: New test.
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions