(On, "non-preelaborable call not allowed in preelaborated unit");
pragma Warnings (On, "non-static constant in preelaborated unit");
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
-----------------------
-- Local Subprograms --
-----------------------
end if;
end To_Pos_Int;
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end System.Arith_Double;
new Atomic_Compare_Exchange (Atomic_Type);
begin
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
if Expected /= Desired then
if Atomic_Type'Atomic_Always_Lock_Free then
return My_Atomic_Compare_Exchange (Ptr, Expected'Address, Desired);
end if;
return True;
+
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end Lock_Free_Try_Write;
end System.Atomic_Primitives;
RightB : constant Bits := To_Bits (Right);
begin
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
if Llen /= Rlen then
return False;
end if;
end;
end if;
+
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end Bit_Eq;
-------------
function To_Big_Bytes is new
Ada.Unchecked_Conversion (System.Address, Big_Bytes_Ptr);
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
----------------------
-- Compare_Array_S8 --
----------------------
end if;
end Compare_Array_S8_Unaligned;
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end System.Compare_Array_Signed_8;
function To_Big_Bytes is new
Ada.Unchecked_Conversion (System.Address, Big_Bytes_Ptr);
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
----------------------
-- Compare_Array_U8 --
----------------------
end if;
end Compare_Array_U8_Unaligned;
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end System.Compare_Array_Unsigned_8;
-- Compare_Array_S16 --
-----------------------
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
function Compare_Array_S16
(Left : System.Address;
Right : System.Address;
end if;
end Compare_Array_S16;
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end System.Compare_Array_Signed_16;
-- Compare_Array_S32 --
-----------------------
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
function Compare_Array_S32
(Left : System.Address;
Right : System.Address;
end if;
end Compare_Array_S32;
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end System.Compare_Array_Signed_32;
-- Compare_Array_S64 --
-----------------------
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
function Compare_Array_S64
(Left : System.Address;
Right : System.Address;
end if;
end Compare_Array_S64;
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end System.Compare_Array_Signed_64;
-- Compare_Array_U16 --
-----------------------
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
function Compare_Array_U16
(Left : System.Address;
Right : System.Address;
end if;
end Compare_Array_U16;
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end System.Compare_Array_Unsigned_16;
-- Compare_Array_U32 --
-----------------------
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
function Compare_Array_U32
(Left : System.Address;
Right : System.Address;
end if;
end Compare_Array_U32;
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end System.Compare_Array_Unsigned_32;
-- Compare_Array_U64 --
-----------------------
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
function Compare_Array_U64
(Left : System.Address;
Right : System.Address;
end if;
end Compare_Array_U64;
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end System.Compare_Array_Unsigned_64;
-- Ghost variable to hold Factor**Exp between Exp and Factor updates
begin
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
-- We use the standard logarithmic approach, Exp gets shifted right
-- testing successive low order bits and Factor is the value of the
-- base raised to the next power of 2.
pragma Assert (Big (Result) = Big (Left) ** Right);
return Result;
+
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end Expon;
----------------------
-- Ghost variable to hold Factor**Exp between Exp and Factor updates
begin
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "early returns for performance");
+
-- We use the standard logarithmic approach, Exp gets shifted right
-- testing successive low order bits and Factor is the value of the
-- base raised to the next power of 2.
pragma Assert (Big (Result) = Big (Left) ** Right);
return Result;
+
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end Expon;
----------------------
function Last_Number_Ghost (Str : String) return Positive is
begin
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "occurs in ghost code, not executable");
+
for J in Str'Range loop
if Str (J) not in '0' .. '9' | '_' then
return J - 1;
end loop;
return Str'Last;
+
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end Last_Number_Ghost;
end System.Val_Spec;
function Last_Hexa_Ghost (Str : String) return Positive is
begin
+ pragma Annotate (Gnatcheck, Exempt_On, "Improper_Returns",
+ "occurs in ghost code, not executable");
+
for J in Str'Range loop
if Str (J) not in '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' | '_' then
return J - 1;
end loop;
return Str'Last;
+
+ pragma Annotate (Gnatcheck, Exempt_Off, "Improper_Returns");
end Last_Hexa_Ghost;
-----------------------------