public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Dodji Seketeli <dodji@redhat.com>
To: Dodji Seketeli <dodji@redhat.com>
Cc: libabigail@sourceware.org,  woodard@redhat.com
Subject: [PATCH 3/6] reader: Don't lose anonymous-ness of decl-only classes
Date: Fri, 27 Nov 2020 18:06:37 +0100	[thread overview]
Message-ID: <874kla7mqq.fsf@redhat.com> (raw)
In-Reply-To: <87h7pa7n8c.fsf@redhat.com> (Dodji Seketeli's message of "Fri, 27 Nov 2020 17:56:03 +0100")

Hello,

When reading an anonymous declaration-only class from ABIXML
libabigail forgets to set the is-anonymous class.  This leads to
spurious change reports when comparing a binary against its ABIXML
representation.  Fixed thus.

Note that this doesn't yet impact any regression test but is useful
for a coming patch that will make abidw --abidiff to emit an error for
all ABI changes, not just the hard incompatible ones.  Without this
change, that coming patch will make runtestreaddwarf to fail.

	* src/abg-reader.cc (build_class_decl): Set the is-anonymous flag
	when reading a decl-only class.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>

Applied to master.

---
 src/abg-reader.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/abg-reader.cc b/src/abg-reader.cc
index e801f174..84e670df 100644
--- a/src/abg-reader.cc
+++ b/src/abg-reader.cc
@@ -4454,6 +4454,8 @@ build_class_decl(read_context&		ctxt,
 	  decl.reset(new class_decl(env, name, is_struct));
 	  if (size_in_bits)
 	    decl->set_size_in_bits(size_in_bits);
+	  if (is_anonymous)
+	    decl->set_is_anonymous(is_anonymous);
 	}
       else
 	decl.reset(new class_decl(env, name, size_in_bits, alignment_in_bits,
-- 
2.29.2


-- 
		Dodji


  parent reply	other threads:[~2020-11-27 17:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27 16:56 [PATCH 0/6] Fix subtle ABI artifact representation issues Dodji Seketeli
2020-11-27 17:03 ` [PATCH 1/6] writer: Emit definitions of declarations when they are present Dodji Seketeli
2020-11-30 13:49   ` Giuliano Procida
2020-11-30 15:56     ` Dodji Seketeli
2020-11-30 18:15       ` Giuliano Procida
2020-12-01  9:51         ` Dodji Seketeli
2020-11-27 17:05 ` [PATCH 2/6] ir: Introduce internal pretty representation for anonymous classes Dodji Seketeli
2020-11-27 17:06 ` Dodji Seketeli [this message]
2020-11-27 17:07 ` [PATCH 4/6] dwarf-reader: Avoid having several functions with the same symbol Dodji Seketeli
2020-11-27 17:08 ` [PATCH 5/6] abidw: make --abidiff report any change against own ABIXML Dodji Seketeli
2020-11-27 17:08 ` [PATCH 6/6] abipkgdiff: make --self-check to fail on " Dodji Seketeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kla7mqq.fsf@redhat.com \
    --to=dodji@redhat.com \
    --cc=libabigail@sourceware.org \
    --cc=woodard@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).