From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 83B903858C39; Tue, 7 Mar 2023 15:43:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83B903858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678203796; bh=lhjL9Eah6MTxqtt4Th9Kt08oruwlwLopZT0bYFuJ1gc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rCtWYN9648MpMkI31oygSm2BDPlP5cyYKnOmTZzBb3hOQ4Gp2+yik2c5+5rRmvwQh a0bpJ+g4v9eNdoZS+de2hXbIpPd6TEgOcGoRR68fRNX5B5Y3HZUbTpr6xxQQzsNx/N AwNaWs+JEn5BAA1nP3v335mKeS3xYd9+kHQguzfI= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109049] std::declval gives wrong result for cv void Date: Tue, 07 Mar 2023 15:43:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: redi 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=3D109049 --- Comment #4 from Jonathan Wakely --- I thought it was already allowed, because std::declval is not an addressable function ([namespace.std]) but that only covers forming pointers and refere= nces to functions. We should extend that to cover this case.=