[C++ PATCH] Fix -fsanitize=return on small functions (PR c++/77722)
Jason Merrill
jason@redhat.com
Tue Sep 27 15:01:00 GMT 2016
On Tue, Sep 27, 2016 at 3:57 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> @@ -1570,14 +1570,22 @@ cp_ubsan_maybe_instrument_return (tree f
> + if (TREE_CODE (*p) == STATEMENT_LIST)
> {
> + tree_stmt_iterator i = tsi_last (*p);
> tsi_link_after (&i, t, TSI_NEW_STMT);
> }
> + else
> + {
> + tree list = NULL_TREE;
> + append_to_statement_list_force (*p, &list);
> + append_to_statement_list (t, &list);
> + *p = list;
> + }
Can't you replace all of this with
append_to_statement_list (t, p);
?
OK either way.
Jason
More information about the Gcc-patches
mailing list