public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wei_mj at 139 dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95517] [coroutines] suggested warning when co_return and return_void() are missing Date: Tue, 10 Aug 2021 03:17:21 +0000 [thread overview] Message-ID: <bug-95517-4-QLPMM48YXL@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95517-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95517 mengjun wei <wei_mj at 139 dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wei_mj at 139 dot com --- Comment #4 from mengjun wei <wei_mj at 139 dot com> --- GCC 11.2 no longer allow return_value and return_void be both defined, may this restriction be removed? This makes the co_return statement necessary: CTask workflow_work(CTaskScheduler::RawPtr scheduler, co_comm_ctx::co_comm_workflow* workflow, const char* buf, int len) { co_comm_resp_impl::ptr response(new co_comm_resp_impl); co_await co_comm_ctx::short_req_task::create(workflow, 1, buf, len, response); co_await co_comm_ctx::short_req_task::create(workflow, 2, buf, len, response); co_await co_comm_ctx::resp_task::create(workflow, response->result.c_str(), response->result.length()); co_return 0; }
next prev parent reply other threads:[~2021-08-10 3:17 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-03 21:13 [Bug c++/95517] New: " bruck.michael at gmail dot com 2020-06-04 19:22 ` [Bug c++/95517] " iains at gcc dot gnu.org 2021-04-27 11:38 ` jakub at gcc dot gnu.org 2021-07-28 7:04 ` rguenth at gcc dot gnu.org 2021-08-10 3:17 ` wei_mj at 139 dot com [this message] 2021-08-10 5:32 ` iains at gcc dot gnu.org 2022-04-21 7:48 ` rguenth at gcc dot gnu.org 2023-05-29 10:02 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-95517-4-QLPMM48YXL@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).