https://gcc.gnu.org/g:0d787df6f2926e357f4c7791281c157804f91ed3

commit r16-5774-g0d787df6f2926e357f4c7791281c157804f91ed3
Author: Jose E. Marchesi <[email protected]>
Date:   Sat Oct 11 19:42:30 2025 +0200

    a68: DWARF language codes
    
    This commit makes GCC aware of the DWARF numbers recently allocated
    for Algol 68.
    
    For DWARF 5, DW_LANG_Algol68 = 0x44.
    For DWARF 6, DW_LNAME_Algol68 = 0x2e
        with versioning schema YYYY, starting with 1973 for the original
        Revised language. The language extensions we are working on will
        be encoded in subsequent versions, 2025 etc.
    
    See https://dwarfstd.org/issues/250304.1.html for more information.
    
    Signed-off-by: Jose E. Marchesi <[email protected]>
    
    gcc/ChangeLog
    
            * dwarf2out.cc: Set DW_LANG_Algol68 an DW_LNAME_Algol68.
    
    include/ChangeLog
    
            * dwarf2.h (DW_LANG_Algol68): Define.
            (DW_LNAME_Algol68): Likewise.

Diff:
---
 gcc/dwarf2out.cc | 8 ++++++++
 include/dwarf2.h | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc
index 9251bcf6cbb9..16f9b855a993 100644
--- a/gcc/dwarf2out.cc
+++ b/gcc/dwarf2out.cc
@@ -25821,6 +25821,14 @@ gen_compile_unit_die (const char *filename)
          else if (strcmp (language_string, "GNU Rust") == 0)
            language = DW_LANG_Rust;
        }
+      else if (!dwarf_strict)
+        {
+          if (strcmp (language_string, "GNU Algol 68") == 0)
+           {
+             language = DW_LANG_Algol68;
+             lname = DW_LNAME_Algol68;
+           }
+        }
     }
   /* Use a degraded Fortran setting in strict DWARF2 so is_fortran works.  */
   else if (startswith (language_string, "GNU Fortran"))
diff --git a/include/dwarf2.h b/include/dwarf2.h
index 344447fbc368..638e131437ed 100644
--- a/include/dwarf2.h
+++ b/include/dwarf2.h
@@ -409,6 +409,7 @@ enum dwarf_source_language
     DW_LANG_Ruby = 0x0040,
     DW_LANG_Move = 0x0041,
     DW_LANG_Hylo = 0x0042,
+    DW_LANG_Algol68 = 0x0044,
 
     DW_LANG_lo_user = 0x8000,  /* Implementation-defined range start.  */
     DW_LANG_hi_user = 0xffff,  /* Implementation-defined range end.  */
@@ -476,6 +477,7 @@ enum dwarf_source_language_name
     DW_LNAME_Odin = 0x002a,
     DW_LNAME_P4 = 0x002b,
     DW_LNAME_Metal = 0x002c,
+    DW_LNAME_Algol68 = 0x002e,
 
     DW_LNAME_lo_user = 0x8000, /* Implementation-defined range start.  */
     DW_LNAME_hi_user = 0xffff  /* Implementation-defined range end.  */

Reply via email to