]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Enforce comment with assertions
authorPiotr Trojanek <trojanek@adacore.com>
Sun, 17 May 2026 11:42:14 +0000 (13:42 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 4 Jun 2026 08:42:19 +0000 (10:42 +0200)
Code cleanup.

gcc/ada/ChangeLog:

* exp_util.adb (Full_Qualified_Name_String): Add assertions; fix style.

gcc/ada/exp_util.adb

index 842ed5998a35df755398ae02cd2588c654a3220a..d10bd801ef6ec5cd3558f8b4b4cc357ea1725245 100644 (file)
@@ -7408,6 +7408,8 @@ package body Exp_Util is
          --  don't bother about those.
 
          if Chars (Ent) = No_Name then
+            pragma Assert (Ekind (Ent) = E_Block);
+            pragma Assert (No (Scope (Ent)));
             return;
          end if;
 
@@ -7419,7 +7421,7 @@ package body Exp_Util is
          return;
       end Internal_Full_Qualified_Name;
 
-   --  Start of processing for Full_Qualified_Name
+   --  Start of processing for Full_Qualified_Name_String
 
    begin
       Start_String;