Re: [C++ PATCH] Avoid bogus -Wreturn-local-addr warnings in templates (PR c++/82600)

2017-10-19 Thread Nathan Sidwell
On 10/19/2017 04:15 AM, Jakub Jelinek wrote: Hi! A recent change to check_return_expr resulted in maybe_warn_about_returning_address_of_local being called also with processing_template_decl. The problem with that is that the function relies on folding (fold_for_warn) which isn't performed at

[C++ PATCH] Avoid bogus -Wreturn-local-addr warnings in templates (PR c++/82600)

2017-10-19 Thread Jakub Jelinek
Hi! A recent change to check_return_expr resulted in maybe_warn_about_returning_address_of_local being called also with processing_template_decl. The problem with that is that the function relies on folding (fold_for_warn) which isn't performed at all when processing_template_decl. So, we have