On Thu, Jan 22, 2026 at 04:48:00PM -0500, Marek Polacek wrote:
> Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk?
> 
> -- >8 --
> A little cleanup as suggested in
> <https://gcc.gnu.org/pipermail/gcc-patches/2025-December/704168.html>.
> 
> gcc/cp/ChangeLog:
> 
>       * tree.cc (handle_annotation_attribute): Use build_stub_type.

Oops, missed this spot, guess I was only searching through reflect.cc.

LGTM.

> diff --git a/gcc/cp/tree.cc b/gcc/cp/tree.cc
> index b6550a2f048..bb00fff4a77 100644
> --- a/gcc/cp/tree.cc
> +++ b/gcc/cp/tree.cc
> @@ -5956,11 +5956,9 @@ handle_annotation_attribute (tree *node, tree 
> ARG_UNUSED (name),
>       {
>         tree arg = make_tree_vec (1);
>         tree type = TREE_TYPE (TREE_VALUE (args));
> -       tree ctype
> -         = cp_build_qualified_type (type, cp_type_quals (type)
> -                                          | TYPE_QUAL_CONST);
>         TREE_VEC_ELT (arg, 0)
> -         = cp_build_reference_type (ctype, /*rval=*/false);
> +         = build_stub_type (type, cp_type_quals (type) | TYPE_QUAL_CONST,
> +                            /*rvalue=*/false);
>         if (!is_xible (INIT_EXPR, type, arg))
>           {
>             auto_diagnostic_group d;
> 
> base-commit: 2ab314d52bf762059d6c15caf007151381180773

        Jakub

Reply via email to