From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) by sourceware.org (Postfix) with ESMTPS id 954A4388CC1E for ; Mon, 30 Nov 2020 18:15:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 954A4388CC1E Received: by mail-vs1-xe35.google.com with SMTP id k17so6815262vsp.13 for ; Mon, 30 Nov 2020 10:15:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IpG+ZzGu5JZai3Plo8gbwNx2ogfrxlC5/sz84YOfS3o=; b=p7L5nF3GzL+rpY2/bHTAe12XeH2khydRF4CitNjb6qqBsQl1rKNSWcxknaKk78SzH9 sTeuK8R/M1q+BKpN3mIW8g3vWUpbi+V0aH5WhiPDPOEnwVWNCS3boa8UErY3poVR8Bt/ lXmNVZ0mHLKmMQb3hAWsjmsiSdVJBln6//U2VJRUxpYbg9U+bHDg2gJJbv+f1nTkkwAJ xvM+/jS5MANi9NufRGaozpRDhZbkY18DIZTxCCHKSUYfXipt9r0DRXrPJrHJcqayiS2k yHrkDhxnJxbkVd3NIVFgU9zao4KRYxP8rm7B/jU5MdYDTR0ZVBzG9LG479BM8iv0D0V6 Wn4A== X-Gm-Message-State: AOAM530f/RekJ7G03lZdfneZQC5Uiz/FBVmtPYmsmRhSTnVOPgAtIoBl YtCsZRfucfkXyOK3aaD7F2CDP44LBJ35oQ3wB8oC5w== X-Google-Smtp-Source: ABdhPJzsAdMTaV4MukYTm4KUpTEMiF3bpIGCp/f2o6LdBxuEdlKoDb/5CGbLyrd2UUK3wsaahndQB1DnlOuGTbIQCZ4= X-Received: by 2002:a05:6102:724:: with SMTP id u4mr17541332vsg.4.1606760147861; Mon, 30 Nov 2020 10:15:47 -0800 (PST) MIME-Version: 1.0 References: <87h7pa7n8c.fsf@redhat.com> <87czzy7mw5.fsf@redhat.com> <87a6uy6dp9.fsf@seketeli.org> In-Reply-To: <87a6uy6dp9.fsf@seketeli.org> From: Giuliano Procida Date: Mon, 30 Nov 2020 18:15:11 +0000 Message-ID: Subject: Re: [PATCH 1/6] writer: Emit definitions of declarations when they are present To: Dodji Seketeli Cc: Giuliano Procida via Libabigail X-Spam-Status: No, score=-23.9 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Mon, 30 Nov 2020 18:15:50 -0000 Hi. On Mon, 30 Nov 2020 at 15:56, Dodji Seketeli wrote: > Hello Giuliano, > > Giuliano Procida via Libabigail a =C3=A9crit: > > > Hi Dodji. > > > > I had a quick scan through this. > > > > Do we need look_through_decl_only_enum somewhere as well? > > 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. > > What do you think? > > I agree. TBH, in retrospect, all the forward-declared enum changes could have waited. I can paste your comment into Bugzilla, but you might prefer something else. Regards, Giuliano. > [...] > > Cheers, > > > -- > Dodji > >