From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B5580386101F; Fri, 4 Dec 2020 12:16:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5580386101F From: "gprocida+abigail at google dot com" To: libabigail@sourceware.org Subject: [Bug default/27014] New: Ensure XML writer handles forward-declared enums as it does classes and unions Date: Fri, 04 Dec 2020 12:16:23 +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: enhancement X-Bugzilla-Who: gprocida+abigail 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: Fri, 04 Dec 2020 12:16:23 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27014 Bug ID: 27014 Summary: Ensure XML writer handles forward-declared enums as it does classes and unions Product: libabigail Version: unspecified Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: default Assignee: dodji at redhat dot com Reporter: gprocida+abigail at google dot com CC: libabigail at sourceware dot org Target Milestone: --- With regard to https://sourceware.org/git/?p=3Dlibabigail.git;a=3Dcommit;h=3D35162bd4e3622= 67502016c564edfe95ba99c514c I posed the question: Do we need *look_through_decl_only_enum* somewhere as well? Dodji replied: Good question. Right now, when the equals function compares enums, it doens't look through the declaration to get the definition of the enum. It will only use the decl-only part of the enum in the comparison, even if the enum decl was fully resolved to its definition. For classes (and unions) however, equals always looks through the declaration. So, at ABIXML write time, if we happen to not saving the definition and we only save the decl-only part, the comparison should be done between the decl-only part of both enums (the one in the IR coming from the binary and the one from the IR coming from the ABIXML) being compared. So it shouldn't yield an ABI change. Now, the behaviour for classes/unions can be said to be inconsistent with the behaviour for enums. So we might indeed want to always serialize the definition of declarations of enum if we have it. But then, we'd need update at least the 'equals' comparison function accordingly, I believe. But as this is like getting into the "feature" territory (kind of) I'd wait for releasing 1.8 before doing this. --=20 You are receiving this mail because: You are on the CC list for the bug.=