From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 77F973857351; Thu, 29 Sep 2022 19:01:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77F973857351 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664478063; bh=bfDYTWg/tnG6oQbqYiSSVbGglF5vbOkPkYHRKfY/dz4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tVfhEFPvmO8+se0i8uG7L3Owwjvh5GH6Rjvm9s5CmczLIC7NiQijzWLPM0w+xxk0G Uq1TOitcyCbyyhFCiC11H/du8ZCRI2RGoO3waIfjirhnluRH5Ooz77baDEpWA9/4GK ylkOto+E/LUe7FE7jkODw3BVOoseyS0/4pj0voBE= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107065] GCC treats rvalue as an lvalue Date: Thu, 29 Sep 2022 19:01:03 +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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to attachments.created 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=3D107065 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gn= u.org --- Comment #9 from Jakub Jelinek --- Created attachment 53642 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53642&action=3Dedit gcc13-pr107065.patch I'd say it is wrong to fold this already during parsing, we should do such optimizations only during cp_fold* and later.=