public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/27014] New: Ensure XML writer handles forward-declared enums as it does classes and unions
@ 2020-12-04 12:16 gprocida+abigail at google dot com
  0 siblings, 0 replies; only message in thread
From: gprocida+abigail at google dot com @ 2020-12-04 12:16 UTC (permalink / raw)
  To: libabigail

https://sourceware.org/bugzilla/show_bug.cgi?id=27014

            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=libabigail.git;a=commit;h=35162bd4e362267502016c564edfe95ba99c514c
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-04 12:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 12:16 [Bug default/27014] New: Ensure XML writer handles forward-declared enums as it does classes and unions gprocida+abigail at google dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).