From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 00487384DD00; Mon, 22 Apr 2024 19:11:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00487384DD00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713813115; bh=eXK+as8EkF1gjq1+WjXcGkJLQidTKFwl+GwqdOiW2i0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PtUBVgJlbckHD2cfIrzCKrV/1sSDKPkaunzsx407no66HrSdCwoRDXmsW107Oiji4 HpEY25S8ogYG0hSFwGPFSJyIZnyvEQ+7hUgKjlTwUCzctpTlUFNIHymS1F4AcVd4u3 wcOMROOLmuQjmDbK5ixwo/FopVHkdn/S1eG3uWyI= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/114808] Qualified void return type is not diagnosed Date: Mon, 22 Apr 2024 19:11:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114808 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #1 from Jakub Jelinek --- I don't see such a sentence in C++17 nor other C++ standards. All compilers I've tried accept it. On the other side, e.g. http://eel.is/c++draft/basic.fundamental#15 talks a= bout functions returning cv void. Similarly http://eel.is/c++draft/stmt.return#2 And https://eel.is/c++draft/dcl.fct#14 explicitly says "The return type shall be a non-array object type, a reference type, or cv void." This is something that was earlier said in [expr.call]/3 (e.g. in C++17, [expr.call]/5 in C++20).=