[4/5] c++/reflection: Fix wrong function name in error messages
Commit Message
gcc/cp/ChangeLog:
* reflect.cc (eval_display_string_of): Fix copy-paste error in exception
messages.
---
gcc/cp/reflect.cc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Comments
On Tue, Apr 07, 2026 at 07:08:25PM +0800, Yang Kun wrote:
> gcc/cp/ChangeLog:
> * reflect.cc (eval_display_string_of): Fix copy-paste error in exception
> messages.
> ---
> gcc/cp/reflect.cc | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/gcc/cp/reflect.cc b/gcc/cp/reflect.cc
> index 71573d27f..1f8a7800f 100644
> --- a/gcc/cp/reflect.cc
> +++ b/gcc/cp/reflect.cc
> @@ -3702,13 +3702,14 @@ eval_display_string_of (location_t loc, const constexpr_ctx *ctx, tree r,
> if (str == NULL_TREE)
> {
> if (elt_type == char_type_node)
> - return throw_exception (loc, ctx, "identifier_of not representable"
> + return throw_exception (loc, ctx, "display_string_of not representable"
> " in ordinary literal encoding",
> fun, non_constant_p, jump_target);
> else
> - return throw_exception (loc, ctx, "u8identifier_of not representable"
> - " in UTF-8", fun, non_constant_p,
> - jump_target);
> + return throw_exception (loc, ctx,
> + "u8display_string_of not representable"
> + " in UTF-8",
> + fun, non_constant_p, jump_target);
> }
> releasing_vec args (make_tree_vector_single (str));
> tree ret = build_special_member_call (NULL_TREE, complete_ctor_identifier,
LGTM, but same legal question applies.
Jakub
@@ -3702,13 +3702,14 @@ eval_display_string_of (location_t loc, const constexpr_ctx *ctx, tree r,
if (str == NULL_TREE)
{
if (elt_type == char_type_node)
- return throw_exception (loc, ctx, "identifier_of not representable"
+ return throw_exception (loc, ctx, "display_string_of not representable"
" in ordinary literal encoding",
fun, non_constant_p, jump_target);
else
- return throw_exception (loc, ctx, "u8identifier_of not representable"
- " in UTF-8", fun, non_constant_p,
- jump_target);
+ return throw_exception (loc, ctx,
+ "u8display_string_of not representable"
+ " in UTF-8",
+ fun, non_constant_p, jump_target);
}
releasing_vec args (make_tree_vector_single (str));
tree ret = build_special_member_call (NULL_TREE, complete_ctor_identifier,