diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2024-04-03 11:51:46 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2024-06-10 11:03:59 +0200 |
commit | e425edc58025990c01a25c9a8be016a2f41e787e (patch) | |
tree | 48d630f42826dc143d71273308c37cfc20ba0176 /gcc/ada/sem_attr.adb | |
parent | 025fd3eabc12a5b5ee63b607a2fa26aafb3a39b4 (diff) | |
download | gcc-e425edc58025990c01a25c9a8be016a2f41e787e.zip gcc-e425edc58025990c01a25c9a8be016a2f41e787e.tar.gz gcc-e425edc58025990c01a25c9a8be016a2f41e787e.tar.bz2 |
ada: Skip processing of NUL character for attribute Type_Key
Code cleanup; behavior is unaffected.
gcc/ada/
* sem_attr.adb (Analyze_Attribute): Use fully qualified name
without a NUL, so that it doesn't need to be skipped afterwards.
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r-- | gcc/ada/sem_attr.adb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 403810c..4fd270a 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -6863,8 +6863,8 @@ package body Sem_Attr is -------------- when Attribute_Type_Key => Type_Key : declare - Full_Name : constant String_Id := - Fully_Qualified_Name_String (Entity (P)); + Full_Name : constant String_Id := + Fully_Qualified_Name_String (Entity (P), Append_NUL => False); CRC : CRC32; -- The computed signature for the type @@ -6997,9 +6997,9 @@ package body Sem_Attr is Start_String; Deref := False; - -- Copy all characters in Full_Name but the trailing NUL + -- Copy all characters in Full_Name - for J in 1 .. String_Length (Full_Name) - 1 loop + for J in 1 .. String_Length (Full_Name) loop Store_String_Char (Get_String_Char (Full_Name, Pos (J))); end loop; |