From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AC9273858D39; Tue, 11 Apr 2023 09:48:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC9273858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681206522; bh=jBmVj9/yWcODDRto0knmk9eqlPIHbS1B6f7ojsqQEB8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Dzz5AnxQAV7GOJmGJbKQhLs9vzQHxVYRajLb8TXnNYRvGiApahgKEhVQbeswAjMyt VMg+QzVOAxYC7RUJb1h+1J1B9/yLzlVe8Hq+8LlEmFaCy7HD63LqAzEMnxBSP/fqOT g1pucjpw6x6uhWfrRDeNUC0jV8ghuVUh4XYWY9So= From: "johannes.kellner at wandelbots dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109470] unexpected const & behavior Date: Tue, 11 Apr 2023 09:48:42 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: johannes.kellner at wandelbots dot com 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: 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=3D109470 Johannes Kellner changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |--- Status|RESOLVED |UNCONFIRMED --- Comment #3 from Johannes Kellner --- 'A temporary object bound to a reference parameter in a function call persi= sts until the completion of the full-expression containing the call.' So this does not mean, that the temporary object, (int)lenght, should life until the end of main ??? As main() is the enclosing scope?=