+2017-10-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/82600
+ * typeck.c (check_return_expr): Don't call
+ maybe_warn_about_returning_address_of_local in templates.
+
2017-10-17 Nathan Sidwell <nathan@acm.org>
PR c++/82560
&& TREE_CODE (TREE_OPERAND (retval, 1)) == AGGR_INIT_EXPR)
retval = build2 (COMPOUND_EXPR, TREE_TYPE (retval), retval,
TREE_OPERAND (retval, 0));
- else if (maybe_warn_about_returning_address_of_local (retval))
+ else if (!processing_template_decl
+ && maybe_warn_about_returning_address_of_local (retval))
retval = build2 (COMPOUND_EXPR, TREE_TYPE (retval), retval,
build_zero_cst (TREE_TYPE (retval)));
}
+2017-10-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/82600
+ * g++.dg/warn/Wreturn-local-addr-4.C: New test.
+
2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/debug/dwarf2/sso.c: Rename into...