diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-20 09:21:59 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-20 09:21:59 +0000 |
commit | b2ff4e1fddca0b032ec844b1ad07db0df798e2ec (patch) | |
tree | 64a85a5e06c6212ca24ee4d1b7a1edb191546fad /gcc/ada/s-imguns.adb | |
parent | c4c4e986552ebc04bab1dfebd119f3bef4740ca2 (diff) | |
download | gcc-b2ff4e1fddca0b032ec844b1ad07db0df798e2ec.tar.gz |
2016-04-20 Yannick Moy <moy@adacore.com>
* osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
* einfo.adb (Set_Overridden_Operation): Add assertion.
* sem_util.adb (Unique_Entity): for renaming-as-body return the spec
entity.
2016-04-20 Javier Miranda <miranda@adacore.com>
* exp_unst.adb (Append_Unique_Call): New subprogram.
(Unnest_Subprogram): Replace the unique occurrence
of Call.Append() by Append_Unique_Call() which protects us from
adding to the Calls table duplicated entries.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* exp_attr.adb (Is_GCC_Target): Fix for C backend.
* xref_lib.ads (Dependencies_Tables): instantiate
Table package with types that guarantee its safe use.
* s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
procedures.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235248 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-imguns.adb')
-rw-r--r-- | gcc/ada/s-imguns.adb | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/gcc/ada/s-imguns.adb b/gcc/ada/s-imguns.adb index a2cce144c3c..c6df94c936a 100644 --- a/gcc/ada/s-imguns.adb +++ b/gcc/ada/s-imguns.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, 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- -- @@ -56,32 +56,17 @@ package body System.Img_Uns is procedure Set_Image_Unsigned (V : Unsigned; S : in out String; - P : in out Natural) - is - procedure Set_Digits (T : Unsigned); - -- Set decimal digits of value of T - - ---------------- - -- Set_Digits -- - ---------------- - - procedure Set_Digits (T : Unsigned) is - begin - if T >= 10 then - Set_Digits (T / 10); - P := P + 1; - S (P) := Character'Val (48 + (T rem 10)); - - else - P := P + 1; - S (P) := Character'Val (48 + T); - end if; - end Set_Digits; - - -- Start of processing for Set_Image_Unsigned - + P : in out Natural) is begin - Set_Digits (V); + if V >= 10 then + Set_Image_Unsigned (V / 10, S, P); + P := P + 1; + S (P) := Character'Val (48 + (V rem 10)); + + else + P := P + 1; + S (P) := Character'Val (48 + V); + end if; end Set_Image_Unsigned; end System.Img_Uns; |