aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/s-exnint.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/libgnat/s-exnint.adb')
-rw-r--r--gcc/ada/libgnat/s-exnint.adb42
1 files changed, 4 insertions, 38 deletions
diff --git a/gcc/ada/libgnat/s-exnint.adb b/gcc/ada/libgnat/s-exnint.adb
index fccd675..3914192 100644
--- a/gcc/ada/libgnat/s-exnint.adb
+++ b/gcc/ada/libgnat/s-exnint.adb
@@ -29,42 +29,8 @@
-- --
------------------------------------------------------------------------------
-package body System.Exn_Int is
+-- This package does not require a body, since it is an instantiation. We
+-- provide a dummy file containing a No_Body pragma so that previous versions
+-- of the body (which did exist) will not interfere.
- -----------------
- -- Exn_Integer --
- -----------------
-
- function Exn_Integer (Left : Integer; Right : Natural) return Integer is
- pragma Suppress (Division_Check);
- pragma Suppress (Overflow_Check);
-
- Result : Integer := 1;
- Factor : Integer := Left;
- Exp : Natural := Right;
-
- begin
- -- 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.
-
- -- Note: it is not worth special casing base values -1, 0, +1 since
- -- the expander does this when the base is a literal, and other cases
- -- will be extremely rare.
-
- if Exp /= 0 then
- loop
- if Exp rem 2 /= 0 then
- Result := Result * Factor;
- end if;
-
- Exp := Exp / 2;
- exit when Exp = 0;
- Factor := Factor * Factor;
- end loop;
- end if;
-
- return Result;
- end Exn_Integer;
-
-end System.Exn_Int;
+pragma No_Body;