[Ada] Qualify internal access-to-subprogram types as not null
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 11 Jan 2021 17:06:35 +0000 (18:06 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 5 May 2021 08:19:01 +0000 (04:19 -0400)
gcc/ada/

* libgnat/g-alleve.adb (Bit_Operation): Now a not-null type.
* libgnat/g-sechas.adb (Fill_Buffer_Access): Likewise.
* libgnat/s-dwalin.adb (Callback): Likewise.

gcc/ada/libgnat/g-alleve.adb
gcc/ada/libgnat/g-sechas.adb
gcc/ada/libgnat/s-dwalin.adb

index 9e446f1..5dc7230 100644 (file)
@@ -258,7 +258,7 @@ package body GNAT.Altivec.Low_Level_Vectors is
       pragma Convention (LL_Altivec, vspltisx);
 
       type Bit_Operation is
-        access function
+        not null access function
         (Value  : Component_Type;
          Amount : Natural) return Component_Type;
 
index c5419e4..178b59b 100644 (file)
@@ -38,7 +38,7 @@ package body GNAT.Secure_Hashes is
                  "0123456789abcdef";
 
    type Fill_Buffer_Access is
-     access procedure
+     not null access procedure
        (M     : in out Message_State;
         SEA   : Stream_Element_Array;
         First : Stream_Element_Offset;
index f3789c1..55989c5 100644 (file)
@@ -130,7 +130,7 @@ package body System.Dwarf_Lines is
       Code :        uint32) return String;
    --  Extract a file name from the prologue
 
-   type Callback is access procedure (C : in out Dwarf_Context);
+   type Callback is not null access procedure (C : in out Dwarf_Context);
    procedure For_Each_Row (C : in out Dwarf_Context; F : Callback);
    --  Traverse each .debug_line entry with a callback