This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
that.

Thanks,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]