This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] dwarf.h: Remove non-existing DW_TAG_mutable_type.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 18 Jun 2014 20:38:56 +0200
- Subject: Re: [PATCH] dwarf.h: Remove non-existing DW_TAG_mutable_type.
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