public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-586] [Ada] Ada.Numerics.Aux.*: Mention more Intrinsic and less C Math Library
Date: Wed, 18 May 2022 08:43:01 +0000 (GMT)	[thread overview]
Message-ID: <20220518084301.A99DF3858434@sourceware.org> (raw)

https://gcc.gnu.org/g:bf7143f736d66051083a6f5d569dc85cfad7e7f6

commit r13-586-gbf7143f736d66051083a6f5d569dc85cfad7e7f6
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Wed Mar 30 05:45:17 2022 -0300

    [Ada] Ada.Numerics.Aux.*: Mention more Intrinsic and less C Math Library
    
    Since we import the elemental math functions as intrinsics, it's not
    accurate to state we're drawing them in from the C math library.
    
    gcc/ada/
    
            * libgnat/a-nagefl.ads: Replace mentions of C/unix math library
            with intrinsics.
            * libgnat/a-nallfl.ads: Likewise.  State compatibility
            requirements.
            * libgnat/a-nalofl.ads: Likewise.
            * libgnat/a-nuaufl.ads: Likewise.

Diff:
---
 gcc/ada/libgnat/a-nagefl.ads |  6 +++---
 gcc/ada/libgnat/a-nallfl.ads | 13 ++++++++-----
 gcc/ada/libgnat/a-nalofl.ads | 13 ++++++++-----
 gcc/ada/libgnat/a-nuaufl.ads | 13 ++++++++-----
 4 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/gcc/ada/libgnat/a-nagefl.ads b/gcc/ada/libgnat/a-nagefl.ads
index ad2e5e3adc6..dc2a0f4c838 100644
--- a/gcc/ada/libgnat/a-nagefl.ads
+++ b/gcc/ada/libgnat/a-nagefl.ads
@@ -31,10 +31,10 @@
 ------------------------------------------------------------------------------
 
 --  This package provides the basic computational interface for the generic
---  elementary functions. The C library version interfaces with the routines
---  in the C mathematical library.
+--  elementary functions.
 
---  This version here is for use with normal Unix math functions.
+--  This version here delegates to interfaces that typically import as
+--  intrinsics the expected math functions.
 
 with Ada.Numerics.Aux_Long_Long_Float;
 with Ada.Numerics.Aux_Long_Float;
diff --git a/gcc/ada/libgnat/a-nallfl.ads b/gcc/ada/libgnat/a-nallfl.ads
index db849da38ae..cf08fced4bf 100644
--- a/gcc/ada/libgnat/a-nallfl.ads
+++ b/gcc/ada/libgnat/a-nallfl.ads
@@ -5,7 +5,7 @@
 --     A D A . N U M E R I C S . A U X . L O N G _ L O N G _ F L O A T      --
 --                                                                          --
 --                                 S p e c                                  --
---                  (C Math Library Version, Long Long Float)               --
+--                    (Instrinsic Version, Long Long Float)                 --
 --                                                                          --
 --          Copyright (C) 1992-2022, Free Software Foundation, Inc.         --
 --                                                                          --
@@ -30,9 +30,12 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This package provides the basic computational interface for the generic
---  elementary functions. The C library version interfaces with the routines
---  in the C mathematical library, and is thus quite portable.
+--  This package provides the basic computational interface for the
+--  generic elementary functions. With the intrinsic version, the
+--  compiler can use its knowledge of the functions to select the most
+--  suitable implementation. It is thus quite portable. These
+--  interfaces are suitable for cases in which Long Long Float and C's
+--  long double share the same representation.
 
 with Ada.Numerics.Aux_Linker_Options;
 pragma Warnings (Off, Ada.Numerics.Aux_Linker_Options);
@@ -42,7 +45,7 @@ package Ada.Numerics.Aux_Long_Long_Float is
 
    subtype T is Long_Long_Float;
 
-   --  We import these functions directly from C. Note that we label them
+   --  We import these functions as intrinsics. Note that we label them
    --  all as pure functions, because indeed all of them are in fact pure.
 
    function Sin (X : T) return T with
diff --git a/gcc/ada/libgnat/a-nalofl.ads b/gcc/ada/libgnat/a-nalofl.ads
index e4e440bfdb5..86d1fc2fa07 100644
--- a/gcc/ada/libgnat/a-nalofl.ads
+++ b/gcc/ada/libgnat/a-nalofl.ads
@@ -5,7 +5,7 @@
 --          A D A . N U M E R I C S . A U X _ L O N G _ F L O A T           --
 --                                                                          --
 --                                 S p e c                                  --
---                     (C Math Library Version, Long Float)                 --
+--                       (Intrinsic Version, Long Float)                    --
 --                                                                          --
 --          Copyright (C) 1992-2022, Free Software Foundation, Inc.         --
 --                                                                          --
@@ -30,9 +30,12 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This package provides the basic computational interface for the generic
---  elementary functions. The C library version interfaces with the routines
---  in the C mathematical library, and is thus quite portable.
+--  This package provides the basic computational interface for the
+--  generic elementary functions. With the intrinsic version, the
+--  compiler can use its knowledge of the functions to select the most
+--  suitable implementation. It is thus quite portable. These
+--  interfaces are suitable for cases in which Long Float and C's
+--  double share the same representation.
 
 with Ada.Numerics.Aux_Linker_Options;
 pragma Warnings (Off, Ada.Numerics.Aux_Linker_Options);
@@ -42,7 +45,7 @@ package Ada.Numerics.Aux_Long_Float is
 
    subtype T is Long_Float;
 
-   --  We import these functions directly from C. Note that we label them
+   --  We import these functions as intrinsics. Note that we label them
    --  all as pure functions, because indeed all of them are in fact pure.
 
    function Sin (X : T) return T with
diff --git a/gcc/ada/libgnat/a-nuaufl.ads b/gcc/ada/libgnat/a-nuaufl.ads
index e38ebb51250..0ee5dfcdca1 100644
--- a/gcc/ada/libgnat/a-nuaufl.ads
+++ b/gcc/ada/libgnat/a-nuaufl.ads
@@ -5,7 +5,7 @@
 --               A D A . N U M E R I C S . A U X _ F L O A T                --
 --                                                                          --
 --                                 S p e c                                  --
---                      (C Math Library Version, Float)                     --
+--                        (Intrinsic Version, Float)                        --
 --                                                                          --
 --          Copyright (C) 1992-2022, Free Software Foundation, Inc.         --
 --                                                                          --
@@ -30,9 +30,12 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This package provides the basic computational interface for the generic
---  elementary functions. The C library version interfaces with the routines
---  in the C mathematical library, and is thus quite portable.
+--  This package provides the basic computational interface for the
+--  generic elementary functions. With the intrinsic version, the
+--  compiler can use its knowledge of the functions to select the most
+--  suitable implementation. It is thus quite portable. These
+--  interfaces are suitable for cases in which Float and C's float
+--  share the same representation.
 
 with Ada.Numerics.Aux_Linker_Options;
 pragma Warnings (Off, Ada.Numerics.Aux_Linker_Options);
@@ -42,7 +45,7 @@ package Ada.Numerics.Aux_Float is
 
    subtype T is Float;
 
-   --  We import these functions directly from C. Note that we label them
+   --  We import these functions as intrinsics. Note that we label them
    --  all as pure functions, because indeed all of them are in fact pure.
 
    function Sin (X : T) return T with


                 reply	other threads:[~2022-05-18  8:43 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=20220518084301.A99DF3858434@sourceware.org \
    --to=pmderodat@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).