From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9BA573858C30; Thu, 3 Aug 2023 16:06:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BA573858C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691078773; bh=9NhKrgxyDiDgKUOsjcw+ELEQnRJTmSW1zfWA/6C4NGA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dza7iyhXyZfnLYYTlnT9xbDhPgvFa52ZOF6dRiHq/BYp/J8qsZNDkG44UOpVb5FE7 vN7a5JH39RiRif9aYOiRqx+xjdBYuWGfiTMr1IpsPyACeYwV8kbU8SLVephtlKu8Qn TiXrLeAi/rQl8hXh5CkieNDVDQgtdnUm5+lWuXvw= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/24318] GDB prints the wrong value Date: Thu, 03 Aug 2023 16:06:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D24318 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |tromey at sourceware dot o= rg Resolution|--- |INVALID --- Comment #5 from Tom Tromey --- The program here is invalid, as Hannes pointed out. Now, that's exactly when you'd want to use gdb. However, in this case, gdb ignores the declaration in test.c in favor of the definition of the object. IOW, it is doing the right thing. Expecting it to mimic the undefined behavior of the source seems a bit weird. Anyway I don't think we should try to change gdb to do this. --=20 You are receiving this mail because: You are on the CC list for the bug.=