# Policy for DWARF6 language codes in DWARF5 producers Background ---------- Issue [210204.1](210204.1.html) added a registration page for new `DW_AT_language` codes (`DW_LANG_`) to supplement the DWARF5 list. Issue [210419.1](210419.1.html) (for DWARF6) split `DW_AT_language` into `DW_AT_language_name` codes (`DW_LNAME`) and `DW_AT_language_version` codes (version schemes). These are listed at with the following note: "The information on this page is part of the Draft of DWARF Version 6 and is subject to change." Some producers are reluctant to add the new language codes for DWARF5 because consumers need to be updated to recognize the language (family). e.g. when using `DW_LANG_C_plus_plus_20`, a consumer might no longer recognize the language being debugged as C++. So a producer will only add new DWARF5 language codes when all consumers have been updated and seen a stable release. Usage of the proposed DWARF6 split `DW_AT_language_name` and `DW_AT_language_version` might help, once all consumers are updated to recognize these. Or when using "old" DWARF5 `DW_AT_language` codes combined with `DW_AT_language_name/version` indicating newer language versions. There is a proposed DWARF Extension registry Issue [231110.3](231110.3.html). But this is for user extensions. The DWARF6 `DW_AT_language_name/version` use reserved numbers (and the note on the languages-v6 says they are not currently stable). Proposed solution ----------------- Replace the Note on to say: > Note: The information on this page is part of the Draft of DWARF > Version 6. But as an exception, the `DW_AT_language_name` (0x90) and > `DW_AT_language_version` (0x91) attributes, plus the `DW_LNAME` constants > listed on this page are fixed (as are the default lower bounds and > version schemes). They may be used in DWARF5 producers when emitting > a CU DIE. Such producers must still also emit a `DW_AT_language` > attribute as listed on . --- 2025-01-06: Accepted, but the listed values are not consistent with latest DWARF-6 draft. `DW_AT_language_name` is 0x90 and `DW_AT_language_version` is 0x91. Will add comment in the TeX source of the spec that these numbers are promised and cannot be changed.