From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5532075054202190739==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] dwarf.h: Remove non-existing DW_TAG_mutable_type. Date: Wed, 18 Jun 2014 20:38:56 +0200 Message-ID: <1403116737.5528.7.camel@bordewijk.wildebeest.org> In-Reply-To: 53A1B4C4.8050205@redhat.com --===============5532075054202190739== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, 2014-06-18 at 08:48 -0700, Josh Stone wrote: > It's fine to patch its use out, in elfutils and others, but why take the > API hit of removing the constant? The number is still allocated, so it > won't do any harm to leave it there. It is not an ABI break. But technically it is indeed not backwards source compatible. Problem with keeping it around is that I haven't seen any correct usage of it. Also other dwarf.h headers, like the one from binutils, don't define it either. And a future version of DWARF might use the number for a completely different purpose. So IMHO it is much better to just get rid of it. > For example, libdwarf just commented on the removal: > > /* Do not use DW_TAG_mutable_type */ > > #define DW_TAG_mutable_type 0x3e /* Withdrawn from DWARF3 by DWARF3f. */ I think the problem with doing that is that people won't read the header file and will miss the comment thinking that if their code compiles it is correct, while the fact they are using the define/constant means their code is actually broken. If there would be a good way to poison the define to cause a compiler warning that would be good. Then we could deprecate it in the next release and remove it in the one after. But I don't know of a way to do that. Thanks, Mark --===============5532075054202190739==--