]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: assign the result of force_paren_expr
authorMarek Polacek <polacek@redhat.com>
Fri, 14 Feb 2025 22:21:31 +0000 (17:21 -0500)
committerMarek Polacek <polacek@redhat.com>
Fri, 14 Feb 2025 22:22:23 +0000 (17:22 -0500)
gcc/cp/ChangeLog:

* pt.cc (tsubst_expr) <COMPONENT_REF>: Assign the result of
force_paren_expr.

gcc/cp/pt.cc

index 5706a3987c34d09905c5acfaf55148b3bb094d19..62d91a2dd15982ece9a48c38fff174e31b1c6714 100644 (file)
@@ -21713,7 +21713,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl)
            r = finish_non_static_data_member (member, object, NULL_TREE,
                                               complain);
            if (REF_PARENTHESIZED_P (t))
-             force_paren_expr (r);
+             r = force_paren_expr (r);
            RETURN (r);
          }
        else if (type_dependent_expression_p (object))