From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0299650374404391726==" MIME-Version: 1.0 From: Josh Stone To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] libdw: Correct spelling of DW_LANG_PLI in dwarf.h. Date: Wed, 26 Oct 2016 11:18:53 -0700 Message-ID: <8762b06a-ee1f-e79f-93d2-94cc80eae11b@redhat.com> In-Reply-To: 20161026174745.GD10081@stream --===============0299650374404391726== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 10/26/2016 10:47 AM, Mark Wielaard wrote: > 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_PL= 1). >>> + 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. It doesn't matter what other headers do -- if someone was already using the bad constant in elfutils' headers, that's an API break. But sure, you might still decide that's acceptable. > Also I would be somewhat afraid that might break the generation > of known-dwarf.h (although I didn't try). It might be ok for known-dwarf.h to know both PL1 and PLI. > Is there actually any source out there that uses this (wrong) > constant name? https://github.com/search?q=3Ddw_lang_pl1&type=3DCode Lots of hits, but in the first few pages they're all just clones of dwarf_aggregate_size.c. via Google I found at least one real hit from an elfutils user: https://lists.gforge.inria.fr/pipermail/simgrid-commits/2015-September/0222= 87.html and it seems some version of eclipse cdt had the same typo: https://www.cct.lsu.edu/~rguidry/eclipse-doc36/src-html/org/eclipse/cdt/uti= ls/debug/dwarf/DwarfConstants.html and also found the typo in a dwarfstd issue: http://www.dwarfstd.org/ShowIssue.php?issue=3D130819.1 >>> - DW_LANG_PL1 =3D 0x000f, /* ISO PL/1:1976 */ >>> + DW_LANG_PLI =3D 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. Figure 8 in the DWARF 3 and 4 standards both call it "ANSI PL/I:1976" (not "ISO"), as does Table 3.1 in the DWARF 5 draft I've got. Wikipedia also uses "PL/I", and even has a redirect from "PL/1". This "I" is pronounced "one" though, surely as a roman numeral. --===============0299650374404391726==--