From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id AC8E13857026 for ; Fri, 27 Nov 2020 17:06:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AC8E13857026 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-587-9y8aYG5hOmKonYY5zwkuLg-1; Fri, 27 Nov 2020 12:06:43 -0500 X-MC-Unique: 9y8aYG5hOmKonYY5zwkuLg-1 Received: by mail-wr1-f72.google.com with SMTP id 91so3664844wrk.17 for ; Fri, 27 Nov 2020 09:06:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version; bh=GjaPgHqm/Wox5cygNrzkT5iBEp8BWdRltuPPwEMW6QQ=; b=dE3m9VQrCXORbaOvgAJPQ2zNiWce0rpa1cgCq2+92KgKhxwIDxUHKmmHP/F2x8yV4p GpoS5F1gZ63jn/rEe5IMbycWNmJW/cMkzPUArxPnOM9rN60/6o2HQcv/ghrrRvhrQwyO UOyXlZsdSwGpqgI2sQcjWBoTqMo1P99fG16e7qE+o7YS5fW3+slpMe0v99T1XwIfzpu9 700jDfrM2NEeNwgrVK/+6p05kRyOtY7cNVHHtJAx4SE90JXbAr6lZ9J+BTrVdM3NL15J 7MTJZKhcwMqmKSLkK5kUhNPcRahAC1cfVa+hRRW2tD+YQYTlsZKJ+rb+ncH5GvFSMmbA OTcQ== X-Gm-Message-State: AOAM5338s98zlIhgQ0w2L4wQAHhjhCkuO0znHNrhXHkiDd8o8xVd957A CQ5ZBFota/gGk4FJaNwcZ6vo9pV9VgA+MaDnvcq/0EIFlBWCCHCqZzzJ/NoZjQ+TJvEgsByfyGC K3q9MIUn4d61vzYzCgVXc X-Received: by 2002:a7b:c05a:: with SMTP id u26mr10262932wmc.159.1606496802555; Fri, 27 Nov 2020 09:06:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+5H0HQ4+zMNpKMTyTwi+B8gsP4covmhiOravUu8A3U/MqlFH4cPpP8ILs/63e3KR6HmNKkA== X-Received: by 2002:a7b:c05a:: with SMTP id u26mr10262908wmc.159.1606496802268; Fri, 27 Nov 2020 09:06:42 -0800 (PST) Received: from localhost ([2a01:e0a:1a0:d060:5246:5dff:feab:d19c]) by smtp.gmail.com with ESMTPSA id 6sm18889935wrn.72.2020.11.27.09.06.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 09:06:38 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id D6C0F5802B4; Fri, 27 Nov 2020 18:06:37 +0100 (CET) From: Dodji Seketeli To: Dodji Seketeli Cc: libabigail@sourceware.org, woodard@redhat.com Subject: [PATCH 3/6] reader: Don't lose anonymous-ness of decl-only classes Organization: Red Hat / France References: <87h7pa7n8c.fsf@redhat.com> X-Operating-System: Fedora 34 X-URL: http://www.redhat.com Date: Fri, 27 Nov 2020 18:06:37 +0100 In-Reply-To: <87h7pa7n8c.fsf@redhat.com> (Dodji Seketeli's message of "Fri, 27 Nov 2020 17:56:03 +0100") Message-ID: <874kla7mqq.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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, 27 Nov 2020 17:06:46 -0000 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 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