public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "enricomaria.dean6elis at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109323] New: No error when neither of return_value or return_void is defined Date: Tue, 28 Mar 2023 21:52:04 +0000 [thread overview] Message-ID: <bug-109323-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109323 Bug ID: 109323 Summary: No error when neither of return_value or return_void is defined Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: enricomaria.dean6elis at gmail dot com Target Milestone: --- Repro: 1. take the example here -> https://en.cppreference.com/w/cpp/language/coroutines 2. remove the 3 `if (cond) co_return;` from `fibonacci_sequence` 3. remove `return_void` from `promise_type` 4. compile Alternatively: https://godbolt.org/z/v3xd3b7TE, where both GCC and Clang erroneously accept the code, whereas MSVC correcly rejects it. (http://eel.is/c++draft/dcl.fct.def.coroutine#6) I'm aware of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95517, but that makes no reference to the fact that not declaring any of the two functions is erroneous.
next reply other threads:[~2023-03-28 21:52 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-28 21:52 enricomaria.dean6elis at gmail dot com [this message] 2023-03-28 21:56 ` [Bug c++/109323] " pinskia at gcc dot gnu.org 2023-03-30 17:49 ` enricomaria.dean6elis at gmail dot com 2023-03-30 18:11 ` enricomaria.dean6elis at gmail dot com 2023-03-30 23:07 ` enricomaria.dean6elis at gmail dot com 2023-03-30 23:07 ` enricomaria.dean6elis at gmail dot com 2024-04-13 2:05 ` pinskia 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-109323-4@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).