DWARF Version 6 Language and Version Codes

Note: The information on this page is part of the Draft of DWARF Version 6. 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 by DWARF Version 5 producers when emitting a CU DIE. Such producers must still also emit a DW_AT_language attribute as listed in DWARF Language Codes.

Issue 210419.1 introduced a way to specify languages and versions separately, and will be adopted for DWARF Version 6. As described in the proposal, each supported language has a specified value for DW_AT_language_name and each version of that language has a unique DW_AT_language_version.

Issue 210514.1 introduced two additional version schemes.

New language codes may be added by submitting a request. See the Public Comment page.

Language Codes

Language Language Code (DW_AT_language_name) Value Default Lower Bound Version Scheme
ISO Ada DW_LNAME_Ada 0x0001 1 YYYY
BLISS DW_LNAME_BLISS 0x0002 0
C (K&R and ISO) DW_LNAME_C 0x0003 0 YYYYMM
ISO C++ DW_LNAME_C_plus_plus 0x0004 0 YYYYMM
ISO Cobol DW_LNAME_Cobol 0x0005 1 YYYY
Crystal DW_LNAME_Crystal 0x0006 0
D DW_LNAME_D 0x0007 0
Dylan DW_LNAME_Dylan 0x0008 0
ISO Fortran DW_LNAME_Fortran 0x0009 1 YYYY
Go DW_LNAME_Go 0x000a 0
Haskell DW_LNAME_Haskell 0x000b 0
Java DW_LNAME_Java 0x000c 0
Julia DW_LNAME_Julia 0x000d 1
Kotlin DW_LNAME_Kotlin 0x000e 0
Modula 2 DW_LNAME_Modula2 0x000f 1
Modula 3 DW_LNAME_Modula3 0x0010 1
Objective C DW_LNAME_ObjC 0x0011 0 YYYYMM
Objective C++ DW_LNAME_ObjC_plus_plus 0x0012 0 YYYYMM
OCaml DW_LNAME_OCaml 0x0013 0
OpenCL C DW_LNAME_OpenCL_C 0x0014 0
ISO Pascal DW_LNAME_Pascal 0x0015 1 YYYY
ANSI PL/I DW_LNAME_PLI 0x0016 1
Python DW_LNAME_Python 0x0017 0
RenderScript Kernel Language DW_LNAME_RenderScript 0x0018 0
Rust DW_LNAME_Rust 0x0019 0
Swift DW_LNAME_Swift 0x001a 0 VVMM
Unified Parallel C (UPC) DW_LNAME_UPC 0x001b 0
Zig DW_LNAME_Zig 0x001c 0
Assembly DW_LNAME_Assembly 0x001d 0
C# DW_LNAME_C_sharp 0x001e 0
Mojo DW_LNAME_Mojo 0x001f 0
OpenGL Shading Language DW_LNAME_GLSL 0x0020 0 VVMMPP
OpenGL ES Shading Language DW_LNAME_GLSL_ES 0x0021 0 VVMMPP
High Level Shading Language DW_LNAME_HLSL 0x0022 0 YYYY
OpenCL C++ DW_LNAME_OpenCL_CPP 0x0023 0 VVMM
C++ for OpenCL DW_LNAME_CPP_for_OpenCL 0x0024 0 VVMM
SYCL DW_LNAME_SYCL 0x0025 0 YYYYRR
Ruby DW_LNAME_Ruby 0x0026 0 VVMMPP
Move DW_LNAME_Move 0x0027 0 YYYYMM
Hylo DW_LNAME_Hylo 0x0028 0
HIP DW_LNAME_HIP 0x0029 0
Odin DW_LNAME_Odin 0x002a 0 YYYYMM
P4 DW_LNAME_P4 0x002b 0 VVMMPP
Metal DW_LNAME_Metal 0x002c 0 VVMMPP
V DW_LNAME_V 0x002d 0 VVMMPP
Algol 68 DW_LNAME_Algol68 0x002e 1 YYYY

Version Schemes

The version schemes listed above are explained in the following table. The value of DW_AT_language_version is an integer value composed from decimal values.

Scheme Encoding
YYYY Year (YYYY) in which the language standard was ratified or released
YYYYMM Year (YYYY) × 100 + month (MM) (e.g., 201703 for a standard ratified in March 2017)
YYYYRR Year (YYYY) × 100 + revision number (RR) (e.g., 202007 for year 2020 revision 7)
VVMM Major version number (VV) × 100 + minor version number (MM) (e.g., 306 for version 3.6)
VVMMPP Major version number (VV) × 10,000 + minor version number (MM) × 100 + patch number (PP) (e.g., 30607 for version 3.6.7)

Version Codes

Language version codes are supplied here for informative purposes only, and are not an official part of the DWARF specification. To add version codes for additional languages, please send a request via the Public Comment page.

Version codes (DW_AT_language_version) for C:

C Version DW_AT_language_version
K&R 000000
C89 198912
C99 199901
C11 201112
C17 201710
C23 202311

Version codes (DW_AT_language_version) for ISO C++:

C++ Version DW_AT_language_version
C++98 199711
C++11 201103
C++14 201402
C++17 201703
C++20 202002
C++23 202302