diff options
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index b613e5d..09e9c73 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -2228,8 +2228,9 @@ defaulted_late_check (tree fn) if (!CLASSTYPE_TEMPLATE_INSTANTIATION (ctx)) { error ("explicitly defaulted function %q+D cannot be declared " - "%qs because the implicit declaration is not %qs:", - fn, "constexpr", "constexpr"); + "%qs because the implicit declaration is not %qs:", fn, + DECL_IMMEDIATE_FUNCTION_P (fn) ? "consteval" : "constexpr", + "constexpr"); explain_implicit_non_constexpr (fn); } DECL_DECLARED_CONSTEXPR_P (fn) = false; |