public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Marc Poulhi?s <dkm@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-4752] ada: Add pragma Annotate for GNATcheck exemptions
Date: Thu, 19 Oct 2023 14:41:21 +0000 (GMT)	[thread overview]
Message-ID: <20231019144121.DFF7E3858422@sourceware.org> (raw)

https://gcc.gnu.org/g:0f3c6348403ad1f6d077f6a09d914f5ec369f784

commit r14-4752-g0f3c6348403ad1f6d077f6a09d914f5ec369f784
Author: Sheri Bernstein <bernstein@adacore.com>
Date:   Fri Oct 6 03:36:49 2023 +0000

    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

Diff:
---
 gcc/ada/libgnat/s-imguti.adb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gcc/ada/libgnat/s-imguti.adb b/gcc/ada/libgnat/s-imguti.adb
index 4b9e27a7d8f1..cb0811089508 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

                 reply	other threads:[~2023-10-19 14:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231019144121.DFF7E3858422@sourceware.org \
    --to=dkm@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).