diff options
author | Sheri Bernstein <bernstein@adacore.com> | 2023-10-06 03:36:49 +0000 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-10-19 16:35:22 +0200 |
commit | 0f3c6348403ad1f6d077f6a09d914f5ec369f784 (patch) | |
tree | 0df63ac627d20fb2963b7cb65909f6efc356fb84 /gcc/ada | |
parent | 1555d18143d7e261eed38188f7511f3075a0f3a5 (diff) | |
download | gcc-0f3c6348403ad1f6d077f6a09d914f5ec369f784.zip gcc-0f3c6348403ad1f6d077f6a09d914f5ec369f784.tar.gz gcc-0f3c6348403ad1f6d077f6a09d914f5ec369f784.tar.bz2 |
ada: Add pragma Annotate for GNATcheck exemptions
Exempt the GNATcheck rule "Unassigned_OUT_Parameters"
with the rationale "the OUT parameter is assigned by component".
gcc/ada/
* libgnat/s-imguti.adb (Set_Decimal_Digits): Add pragma to exempt
Unassigned_OUT_Parameters.
(Set_Floating_Invalid_Value): Likewise
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/libgnat/s-imguti.adb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/libgnat/s-imguti.adb b/gcc/ada/libgnat/s-imguti.adb index 4b9e27a..cb08110 100644 --- a/gcc/ada/libgnat/s-imguti.adb +++ b/gcc/ada/libgnat/s-imguti.adb @@ -37,6 +37,8 @@ package body System.Img_Util is -- Set_Decimal_Digits -- ------------------------ + pragma Annotate (Gnatcheck, Exempt_On, "Unassigned_OUT_Parameters", + "the OUT parameter is assigned by component"); procedure Set_Decimal_Digits (Digs : in out String; NDigs : Natural; @@ -47,6 +49,8 @@ package body System.Img_Util is Aft : Natural; Exp : Natural) is + pragma Annotate (Gnatcheck, Exempt_Off, "Unassigned_OUT_Parameters"); + pragma Assert (NDigs >= 1); pragma Assert (Digs'First = 1); pragma Assert (Digs'First < Digs'Last); @@ -413,6 +417,8 @@ package body System.Img_Util is -- Set_Floating_Invalid_Value -- -------------------------------- + pragma Annotate (Gnatcheck, Exempt_On, "Unassigned_OUT_Parameters", + "the OUT parameter is assigned by component"); procedure Set_Floating_Invalid_Value (V : Floating_Invalid_Value; S : out String; @@ -421,6 +427,8 @@ package body System.Img_Util is Aft : Natural; Exp : Natural) is + pragma Annotate (Gnatcheck, Exempt_Off, "Unassigned_OUT_Parameters"); + procedure Set (C : Character); -- Sets character C in output buffer |