On Wed, 2016-10-26 at 11:18 -0700, Josh Stone wrote:
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_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.
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.
No, you are probably right that isn't acceptable. The case is different
from DW_TAG_mutable_type, which didn't have a real meaning/use. Lets go
with a compatibility #define DW_LANG_PL1 DW_LANG_PLI.
>>> - 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.
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.
ISO/IEC 6522:1992 "Adopts ANSI standard X3.53-1976 [...] as PL/1
programming language standard". Lets keep it as PL/1 to at least show
where the confusion came from.
Updated patch attached.
Cheers,
Mark