From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B1DAF385842E; Sun, 16 Apr 2023 06:51:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1DAF385842E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681627868; bh=93YZrg0AjxSZ2Cszatk5cHoyDOgoiofHEpIgHUR+hRc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YlWeAYWqWwUaT8h4RIz6YIFWxq53O33Q5I92SXJaGkdn7K3OrT0Meq+ctCsq4Cf06 Sz7oWQxgt8QdxZvRzajCwHzPEkjthaBeryLVaPRgd36ylnhCdObnFlwyJ5FplU7NUt P3E5MMClcHjh2isKUYgPTR5ShQxnlC7Uc8f+BGrU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109529] the r-value volatile object is not accepted by the l-value volatile constant argument. Date: Sun, 16 Apr 2023 06:51:08 +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: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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: resolution bug_status 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=3D109529 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski --- only const references can be bound to temporaries. const volatile references cannot be bound to a temporary. That is even this is invalid code: ``` int main(){ const volatile int & a =3D 1; } ```=