From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D2A41385800A; Thu, 22 Sep 2022 16:06:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2A41385800A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663862811; bh=VeFfq+hX3bqKkSEA7akoXCMdfzkyf0uEuwZ1mhleU5A=; h=From:To:Subject:Date:From; b=tu+iwV6NiQIzvv4nSE6Tuezp3+iTUfT99J6zpTFf84SOdUhbJsEm3IVho4wU1gfB8 YMd/aKoprKo9/X7C3OVneR92ChbFUO85BmzU2gpA3iQlHP1DafHSypipBNFcPfDRcK o8ps6yrWQ05bHUDBvXMvYM10KVqIndDd12nRtW48= From: "blarsen at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/29602] New: cant use typedef class name of a baseclass Date: Thu, 22 Sep 2022 16:06:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: blarsen at redhat dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D29602 Bug ID: 29602 Summary: cant use typedef class name of a baseclass Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: c++ Assignee: unassigned at sourceware dot org Reporter: blarsen at redhat dot com Target Milestone: --- Consider the following code: ``` class base{ public: int x; }; typedef base tbase; class derived: public base{ public: int y; }; int main(){ derived der; der.y =3D 0; der.tbase::x =3D 1; return der.tbase::x; } ``` g++ is able to compile it with no problems, but in GDB I get: (gdb)=20 17 return der.tbase::x; (gdb) print der.base::x $1 =3D 1 (gdb) print der.tbase::x A syntax error in expression, near `'. GDB should be able to resolve the typedef in the user expression and find t= he correct member. --=20 You are receiving this mail because: You are on the CC list for the bug.=