This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] libdw: Correct spelling of DW_LANG_PLI in dwarf.h.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 26 Oct 2016 19:47:45 +0200
- Subject: Re: [PATCH] libdw: Correct spelling of DW_LANG_PLI in dwarf.h.
On Wed, Oct 26, 2016 at 09:36:31AM -0700, Josh Stone wrote:
> On 10/26/2016 03:24 AM, Mark Wielaard wrote:
> > The name used in the standard and other DWARF implementations for
> > Programming Language One, PL/I, is DW_LANG_PLI (not DW_LANG_PL1).
> > [...]
> > +Version 0.168
> > +
> > +libdw: dwarf.h corrected the DW_LANG_PLI constant name (was DW_LANG_PL1).
> > + Any existing sources using the old name will have to be updated.
> > +
>
> That typo has been there since the dawn of elfutils.git, 2005-07-26
> commit b08d5a8fb42f. It seems callous to break API here, even if it was
> wrong. Why not include a #define to preserve compatibility?
Since it doesn't break ABI we have historically just fixed such wrong
constant names, see e.g. the removal in 0.160 of the non-existing
DW_TAG_mutable_type in 0.160. Given that others (libdwarf, binutils)
do define the correct name in their headers.
Also I would be somewhat afraid that might break the generation
of known-dwarf.h (although I didn't try).
Is there actually any source out there that uses this (wrong)
constant name?
> > - DW_LANG_PL1 = 0x000f, /* ISO PL/1:1976 */
> > + DW_LANG_PLI = 0x000f, /* ISO PL/1:1976 */
>
> You should correct the comment too, "PL/I".
The '1' in the comment really is correct, because that
is the actual name of the standard. That is probably where
the confusion came from.
Cheers,
Mark