From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DAE623858D20; Tue, 11 Apr 2023 10:23:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DAE623858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681208613; bh=Srxali0+dV/PW+/v0u0kZCAeXWsBpToNwUMHag7InjE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OXsrG+twFMa9OM1eHEPTxWsNortxGYuVdB3b/pjKgWJ70yCw6XNk5B+CMrY6GGAKq vUtVZX8e+zUHSxrJk0Ej3OKh98BPr2TNjB37PRsL/au72TblC4aJKNodlDG15zflU8 8N/Bdcj7duilzITwed1PGR41//BjrqKmfprpQ/bs= 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 10:23:33 +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: 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=3D109470 --- Comment #6 from Johannes Kellner --- Ok, Ok :) It's not to me to argue this. It's just an unexpected behavior (something I was unaware off/ something th= at does not happen when doing the same code with other compilers clang/msvc). And in my humble opinion - `full-expression containing the call` could be understood as - until end of enclosing scope. Or at least if understood this way, I would not have the uninitialized vari= able :) I just had a stupid error and found this as the reason. We discussed it and even others in my team, assumed that it might be a bug. As we were not able= to reproduce this behavior in other compilers we tested. Nor did see this as `invalid` code - `ugly` yes, but not `invalid`. And yes, this code is 'not the best possible way'... Well maybe you take this ticket as a reason to `review` the interpretation, that `full-expression containing the call` does not mean until the `end of enclosing scope`... For me, I'm fine with current outcome. Thank you anyway for the quick, very friendly and professional responses! Best regards=