From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C5B023836C3D; Fri, 5 Mar 2021 16:58:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5B023836C3D From: "gprocida+abigail at google dot com" To: libabigail@sourceware.org Subject: [Bug default/26591] detect pathologically redundant types in abixml Date: Fri, 05 Mar 2021 16:58:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: libabigail X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: gprocida+abigail at google dot com X-Bugzilla-Status: NEW 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: 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 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: Fri, 05 Mar 2021 16:58:56 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26591 --- Comment #3 from Giuliano Procida -= -- This is a small but probably not minimal example to illustrate one issue clearly. If the use of a class member type (I've tried with both typedefs and classe= s) appears before the class containing that type, then `abidw` ends up emitting various types twice. $ head -100 h.h a.cc b.cc =3D=3D> h.h <=3D=3D struct A { typedef int T1; typedef int T2; }; =3D=3D> a.cc <=3D=3D #include "h.h" A::T1 Afun(A) { return 0; } =3D=3D> b.cc <=3D=3D #include "h.h" struct B { typedef A::T2 T; }; B::T Bfun(B) { return 0; } $ g++ -Wall -Wextra -g -c a.cc $ g++ -Wall -Wextra -g -c b.cc $ g++ -Wall -Wextra -g --shared a.o b.o -o ab.so $ g++ -Wall -Wextra -g --shared b.o a.o -o ba.so $ build/tools/abidw ab.so | fgrep -v ' $ build/tools/abidw b.o | grep typedef-decl --=20 You are receiving this mail because: You are on the CC list for the bug.=