From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7DA8C3858C36; Sun, 16 Apr 2023 09:08:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7DA8C3858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681636114; bh=yBHc6NYspD06w1WdESeSJne6R1/x8fwL5tFFiBiOy8o=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j4Aml56oxDHM3/8DpgW2IeXxb0aYmX+R0R0J2fo6enuXO5smGtQkR3BeVsT7Y0c7t JOVdKZIG2TR2qzoW+gnfTTwNBk1riBtJnyMIpV32w2uwbKD1b/KC7nOYy736MRf/hs euhaRZpQRMbrdEbUgEBpUtnCRIZCIgBpQ6/aayoY= From: "lisp2d at rambler dot ru" 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 09:08:34 +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: lisp2d at rambler dot ru 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: 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 --- Comment #6 from Lisp2D --- (In reply to Andrew Pinski from comment #4) > https://stackoverflow.com/questions/40193008/why-a-const-volatile-referen= ce- stackoverflow offers to link an rvalue reference to a variable for this. Bu= t I think this is historical stupidity. int volatile && rx =3D static_cast < int volatile && > ( x ) ; int volatile const & lx =3D rx ;=20=20 fun(lx);=