From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C49C3858413; Wed, 3 Aug 2022 16:44:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C49C3858413 From: "gprocida at google dot com" To: libabigail@sourceware.org Subject: [Bug default/29443] New: abidw loses declarations of global variables having the same name and type as a member of an anonymous struct Date: Wed, 03 Aug 2022 16:44:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gprocida at google dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dodji at redhat dot com 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 cc 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 X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2022 16:44:57 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29443 Bug ID: 29443 Summary: abidw loses declarations of global variables having the same name and type as a member of an anonymous struct Product: libabigail Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: gprocida at google dot com CC: libabigail at sourceware dot org Target Milestone: --- Hi Dodji. Here is a test case we reproduced at current master: df28c220976f41620b0bd7b22000815e11f66b75 Consider this small example: =3D=3D missing_xx.cc =3D=3D struct A { struct { int xx; }; }; struct A a; int xx; Compiled with either g++ 11.3.0 or clang++ 13.0.1 abidw --no-show-locs --no-comp-dir-path --type-id-style hash produces XML that has the elf-symbol xx, but no var-decl: The problem goes away if the anonymous struct is removed or the type differ= s: struct A { int xx; }; or struct A { struct { char xx; }; }; --=20 You are receiving this mail because: You are on the CC list for the bug.=