On 1/19/20 11:07 PM, bin.cheng wrote:
Hi,
The patch sets current_function_returns_value flag in templates for all
co_return/co_yield/co_await cases, as well as for ramp function.  This
fixes false warning message for case like the added, or various cases in
cppcoro.

Bootstrap and test on X86_64, is it OK?

Thanks,
bin

gcc/cp
2020-01-20  Bin Cheng  <bin.li...@linux.alibaba.com>

         * coroutines.cc (finish_co_await_expr): Set return value flag.
         (finish_co_yield_expr, morph_fn_to_coro): Ditto.

gcc/testsuite
2020-01-20  Bin Cheng  <bin.li...@linux.alibaba.com>

         * g++.dg/coroutines/co-return-warning-1.C: New test.


ok, thanks


--
Nathan Sidwell

Reply via email to