From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0DAA3384AB63; Mon, 22 Apr 2024 17:02:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DAA3384AB63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713805349; bh=2gV3opzcIj9nCtI5Etb+vlGtydZFzY/ztQaPthJzCio=; h=From:To:Subject:Date:From; b=hDpHTlS9Nongwpfb/nsbpWXjvJhQxZK5dmQZhixzttOvYtsgXufeBKnz2PvmsjqgA S4tM58Mu18IiHpoJDbFHmdv8h0FIoG5fMrfWhjAMigRCSOymV2pb19Z78yjL/YR0mC fRM1jIEyCJLQYdPbVLK/XR5Z9WlSGXR0vClqY/kY= From: "luigighiron at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/114808] New: Qualified void return type is not diagnosed Date: Mon, 22 Apr 2024 17:02:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: luigighiron at gmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 114808 Summary: Qualified void return type is not diagnosed Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: luigighiron at gmail dot com Target Milestone: --- The following code is accepted in GCC with no diagnostics being produced (e= ven when using -pedantic-errors): const void f(void){} This code violates the following constraint: > The return type of a function shall be void or a complete object type oth= er > than array type. Section 6.9.1 "Function definitions" Paragraph 3 ISO/IEC 9899:2018 const void is not void and it is not a complete object type.=