public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Bug default/27161] New: enumerator additions can be harmful
@ 2021-01-08 11:58 gprocida+abigail at google dot com
  0 siblings, 0 replies; only message in thread
From: gprocida+abigail at google dot com @ 2021-01-08 11:58 UTC (permalink / raw)
  To: libabigail

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

            Bug ID: 27161
           Summary: enumerator additions can be harmful
           Product: libabigail
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          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: ---

libabigail has an asymmetrical definition of "harmless" when it comes to
enumerator additions and removals.

Consider two *library* functions.

int contravariant(enum foo x);
enum foo covariant(int y);

Enumerator additions are safe for users of contravariant but unsafe for users
of covariant, and vice versa with removals.

More generally if a client is expected to consume the enum, removals are safe;
produce the enum, additions are safe. Working out which is happening is general
is impossible.

It really does not make sense to favour one direction over the other. We should
be conservative and treat both as harmful.

-- 
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:[~2021-01-08 11:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 11:58 [Bug default/27161] New: enumerator additions can be harmful 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).