]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove trailing NUL in minimal expansion of Put_Image attribute
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 22 Mar 2024 18:02:00 +0000 (19:02 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 21 May 2024 07:26:45 +0000 (09:26 +0200)
When procedure that implements Put_Image attribute emits the type name,
this name was wrongly followed by a NUL character.

gcc/ada/

* exp_put_image.adb (Build_Record_Put_Image_Procedure): Remove
trailing NUL from the fully qualified type name.

gcc/ada/exp_put_image.adb

index c23b4e24354915b2fc0471b2acc16cfa42088a95..f5141a56626824c36ea11a12b9ec98617936a209 100644 (file)
@@ -832,7 +832,9 @@ package body Exp_Put_Image is
                 Parameter_Associations => New_List
                   (Make_Identifier (Loc, Name_S),
                    Make_String_Literal (Loc,
-                     To_String (Fully_Qualified_Name_String (Btyp))))));
+                     To_String
+                       (Fully_Qualified_Name_String
+                          (Btyp, Append_NUL => False))))));
          end if;
       elsif Is_Null_Record_Type (Btyp, Ignore_Privacy => True) then