From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 986423854171; Fri, 21 Oct 2022 19:14:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 986423854171 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666379656; bh=6X8JxITQbvJw4MEmbdJ2cM9k6hS2Ncph/IOYw2sOhzM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pjMiTZGqppEYXYvUg/1niHXmGuF3+x6rItDdk0SJjtEwYa5YklYBRkyEg/GutG4FE 2JrgTbSBFLeFetATj3G0oWOfw3+a/IufKoFGPpur5oGZz5Ph04WkrDHtk6pNxm4YMC i0aEu+3VnHEXvcl51l9YvI+IcXRB4bVylUoXCuLw= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug c++/29215] Can't find nested type under strange circumstances (outer namespace or unrelated code built without debug info) Date: Fri, 21 Oct 2022 19:14:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on everconfirmed cc bug_status 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=3D29215 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-10-21 Ever confirmed|0 |1 CC| |tromey at sourceware dot o= rg Status|UNCONFIRMED |NEW --- Comment #1 from Tom Tromey --- This is a funny one. The problem is: (gdb) show lang The current source language is "auto; currently c". This happens because 'main' does not have debuginfo and so the current context is assumed to be C. Doing "set lang c++" lets this work. So probably the real question is why "x::t1" works :-) Confirming this bug, but TBH I don't know if it is fixable in a reasonable way. Arguably maybe C and C++ should be closer together here, though in gdb "C" is also used as a fallback when the language isn't known, so this may have adverse consequences. --=20 You are receiving this mail because: You are on the CC list for the bug.=