From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22ACF3858C42; Mon, 22 Apr 2024 19:15:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22ACF3858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1713813310; bh=tvlyfwVyt4ugOSEBQtRTaHMp5aFqWHyhAaN5fLnPkPs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FD/c6fVG9OSnTwvXlRRwgG/XfS0gysiut6uUa6fON/r9gQNAUkgfRH0uC1PcjZL+Q +se5ozhjMu4JkCzlKp/gA2Q6BbPUCZlwdsNoRaYXd6bvzd0ApgODLqaQvlsFGuwJ5R RozNaDXJffjXR4DdE4EOtaBrP2uK0aev0F36cUqE= From: "pinskia 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:15:09 +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: pinskia 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: 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 --- Comment #2 from Andrew Pinski --- (In reply to Jakub Jelinek from comment #1) > I don't see such a sentence in C++17 nor other C++ standards. It was reported for C, not C++ :). Anyways clang rejects it in C mode (with -pedantic-errors): ``` :1:13: error: function cannot return qualified void type 'const voi= d' [-Werror,-Wqualified-void-return-type] 1 | const void f(void){} | ^ ```=