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 [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id DB99B385802D for ; Mon, 30 Nov 2020 15:56:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DB99B385802D Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-438-1FHcsm5qO9iNuhPv45mRCQ-1; Mon, 30 Nov 2020 10:56:21 -0500 X-MC-Unique: 1FHcsm5qO9iNuhPv45mRCQ-1 Received: by mail-wm1-f71.google.com with SMTP id o203so4513157wmo.3 for ; Mon, 30 Nov 2020 07:56:21 -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 :content-transfer-encoding; bh=umPKKIiZkz7rCPazzlh8i8Ku0xPU+tsdIlSxnS69QyA=; b=CgCo1bISJJhuZR+ucBt3QOZH+y8Q5cuh/z28DlNJdThfmOmoq5StHzkwaAeHKtp4EG dh6IwzUaP4fjNRdERu4TbKPJtTFmQgYZlPApLsWxmrtD9R5Ql03FjDzL3dVcg6TNGYbJ HKYsqRHCN3Eqndb9FtUIp5tnd5bXCLLmiy9A8edSaWEYrHTCH3XjVZqK5AObzzhYtAse SefwXlorLyhWSSoWnjLMWhu2SG+jeoDLk6/BI9tJlniHGpnFSgJvGsnzqz/JOWmH+Fl2 Gw4RYvNXzD1qlGw/+xiaGlo2YDjW50Bj3EU69OcfDrZCegtUOBq24JG3yL0mQGY+nhvm e8rA== X-Gm-Message-State: AOAM531ige2o3yIucxq9ZWZB21b5ZaramEXcI4yNYYc3pVUVt8Yu3c7D bl2orIP3IXAay3AmAVwTH4WCwJRvMLDN7COJeivKLPsv54ux8Yr+y9wEIVo4Rt++jcu1ljqM6RD HhquzZTC6mjI/A76hARWx X-Received: by 2002:a7b:cb84:: with SMTP id m4mr23900138wmi.157.1606751780471; Mon, 30 Nov 2020 07:56:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2L9JZ/4XPxdgK9ZchZOTILEcWfWzHvHMhR3wy3HhxwDNnBWNnHWaUOueioL0MwPd42kLllw== X-Received: by 2002:a7b:cb84:: with SMTP id m4mr23900111wmi.157.1606751780168; Mon, 30 Nov 2020 07:56:20 -0800 (PST) Received: from localhost ([2a01:e0a:1a0:d060:5246:5dff:feab:d19c]) by smtp.gmail.com with ESMTPSA id f17sm23804601wmh.10.2020.11.30.07.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 07:56:19 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 5DBAA581C96; Mon, 30 Nov 2020 16:56:18 +0100 (CET) From: Dodji Seketeli To: Giuliano Procida via Libabigail Subject: Re: [PATCH 1/6] writer: Emit definitions of declarations when they are present Organization: Me, myself and I References: <87h7pa7n8c.fsf@redhat.com> <87czzy7mw5.fsf@redhat.com> X-Operating-System: Fedora 34 X-URL: http://www.seketeli.net/~dodji Date: Mon, 30 Nov 2020 16:56:18 +0100 In-Reply-To: (Giuliano Procida via Libabigail's message of "Mon, 30 Nov 2020 13:49:46 +0000") Message-ID: <87a6uy6dp9.fsf@seketeli.org> 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, 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: Mon, 30 Nov 2020 15:56:25 -0000 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? [...] Cheers, --=20 =09=09Dodji