summaryrefslogtreecommitdiff
path: root/gcc/ada/s-valrea.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 08:59:17 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-04 08:59:17 +0000
commit02437c0cacb17eddda6429a98b379b392a961c05 (patch)
treecfa8db7257b2bde4026bddd7892541ff750257f6 /gcc/ada/s-valrea.adb
parent06a352aa5680290db9cc094792b444eec3cbb670 (diff)
downloadgcc-02437c0cacb17eddda6429a98b379b392a961c05.tar.gz
2011-08-04 Tristan Gingold <gingold@adacore.com>
* s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset instead of the locally imported procedure. * s-taprop-mingw.adb (Enter_Task): Ditto. * s-valrea.adb (Scan_Real): Ditto. * s-imgrea.adb (Set_Image_Real): Ditto. * s-flocon.ads: Make the package pure. 2011-08-04 Thomas Quinot <quinot@adacore.com> * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove. * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly. * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement): New subprogram, moved here from... * par.adb, par-ch5.adb (P_Statement_Name): ... here. * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any rewriting of the last argument into a procedure call statement here... * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there instead. 2011-08-04 Thomas Quinot <quinot@adacore.com> * par_sco.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177337 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-valrea.adb')
-rw-r--r--gcc/ada/s-valrea.adb19
1 files changed, 9 insertions, 10 deletions
diff --git a/gcc/ada/s-valrea.adb b/gcc/ada/s-valrea.adb
index 40c5abbca8b..00c6e43a3df 100644
--- a/gcc/ada/s-valrea.adb
+++ b/gcc/ada/s-valrea.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2011, 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- --
@@ -31,6 +31,7 @@
with System.Powten_Table; use System.Powten_Table;
with System.Val_Util; use System.Val_Util;
+with System.Float_Control;
package body System.Val_Real is
@@ -43,14 +44,6 @@ package body System.Val_Real is
Ptr : not null access Integer;
Max : Integer) return Long_Long_Float
is
- procedure Reset;
- pragma Import (C, Reset, "__gnat_init_float");
- -- We import the floating-point processor reset routine so that we can
- -- be sure the floating-point processor is properly set for conversion
- -- calls (see description of Reset in GNAT.Float_Control (g-flocon.ads).
- -- This is notably need on Windows, where calls to the operating system
- -- randomly reset the processor into 64-bit mode.
-
P : Integer;
-- Local copy of string pointer
@@ -173,7 +166,13 @@ package body System.Val_Real is
-- Start of processing for System.Scan_Real
begin
- Reset;
+ -- We call the floating-point processor reset routine so that we can
+ -- be sure the floating-point processor is properly set for conversion
+ -- calls. This is notably need on Windows, where calls to the operating
+ -- system randomly reset the processor into 64-bit mode.
+
+ System.Float_Control.Reset;
+
Scan_Sign (Str, Ptr, Max, Minus, Start);
P := Ptr.all;
Ptr.all := Start;