OSDN Git Service

PR 33870
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-fatgen.ads
index f3e94de..748e517 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2003 Free Software Foundation, Inc.          --
+--          Copyright (C) 1992-2006 Free Software Foundation, Inc.          --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -41,7 +41,7 @@ generic
     type T is digits <>;
 
 package System.Fat_Gen is
-pragma Pure (Fat_Gen);
+   pragma Pure;
 
    subtype UI is Integer;
    --  The runtime representation of universal integer for the purposes of
@@ -71,6 +71,8 @@ pragma Pure (Fat_Gen);
 
    function Machine           (X : T)                       return T;
 
+   function Machine_Rounding  (X : T)                       return T;
+
    function Model             (X : T)                       return T;
 
    function Pred              (X : T)                       return T;
@@ -87,7 +89,7 @@ pragma Pure (Fat_Gen);
 
    function Unbiased_Rounding (X : T)                       return T;
 
-   function Valid (X : access T) return Boolean;
+   function Valid (X : not null access T) return Boolean;
    --  This function checks if the object of type T referenced by X
    --  is valid, and returns True/False accordingly. The parameter is
    --  passed by reference (access) here, as the object of type T may
@@ -95,6 +97,8 @@ pragma Pure (Fat_Gen);
    --  register, and the whole point of 'Valid is to prevent exceptions.
    --  Note that the object of type T must have the natural alignment
    --  for type T. See Unaligned_Valid for further discussion.
+   --
+   --  Note: this routine does not work for Vax_Float ???
 
    function Unaligned_Valid (A : System.Address) return Boolean;
    --  This version of Valid is used if the floating-point value to
@@ -112,11 +116,16 @@ pragma Pure (Fat_Gen);
    --  not require strict alignment (e.g. the ia32/x86), since on a
    --  target not requiring strict alignment, it is fine to pass a
    --  non-aligned value to the standard Valid routine.
+   --
+   --  Note: this routine does not work for Vax_Float ???
 
 private
    pragma Inline (Machine);
    pragma Inline (Model);
-   pragma Inline_Always (Valid);
-   pragma Inline_Always (Unaligned_Valid);
+
+   --  Note: previously the validity checking subprograms (Unaligned_Valid and
+   --  Valid) were also inlined, but this was changed since there were some
+   --  problems with this inlining in optimized mode, and in any case it seems
+   --  better to avoid this inlining (space and robustness considerations).
 
 end System.Fat_Gen;