aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/uintp.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-01-06 11:43:33 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-06 11:43:33 +0100
commit7727a9c182e4e12878b2e4703563cc68a695653d (patch)
tree7892c3212e4e1d407fb34c4778bbbc5b814600e0 /gcc/ada/uintp.adb
parentea1135b83e3c021e45af01ed4cdc5149cd676933 (diff)
downloadgcc-7727a9c182e4e12878b2e4703563cc68a695653d.zip
gcc-7727a9c182e4e12878b2e4703563cc68a695653d.tar.gz
gcc-7727a9c182e4e12878b2e4703563cc68a695653d.tar.bz2
[multiple changes]
2017-01-06 Justin Squirek <squirek@adacore.com> * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove declaration generation in the case of System_Tasking_Protected_Objects_Single_Entry being used, and add a warning message when this is detected to occur. (Make_Initialize_Protection): Remove reference pass in the case of System_Tasking_Protected_Objects_Single_Entry. * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max * s-tposen.adb (Initialize_Protection_Entry): Remove Entry_Queue_Max parameter. * s-tposen.ads: Remove the types use to store the entry queue maximum. * sem_prag.adb (Analyze_Pragma): Remove entry families restriction 2017-01-06 Yannick Moy <moy@adacore.com> * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen behavior of function, to also accept out of range positions and raise Constraint_Error in such case, and to copy sloc from literal if No_Location passed as location. * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior of functions to raise Constraint_Error in case of value not in appropriate range. 2017-01-06 Tristan Gingold <gingold@adacore.com> * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to Invalidate_Stack_Cache. 2017-01-06 Eric Botcazou <ebotcazou@adacore.com> * s-os_lib.adb: Minor fix to the signature of Readlink. 2017-01-06 Javier Miranda <miranda@adacore.com> * sem_ch6.adb (Conforming_Types): Handle another confusion between views in a nested instance with an actual private type whose full view is not in scope. 2017-01-06 Arnaud Charlet <charlet@adacore.com> * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and mark a rewritten if statement as explicit (Comes_From_Source). From-SVN: r244128
Diffstat (limited to 'gcc/ada/uintp.adb')
-rw-r--r--gcc/ada/uintp.adb9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/uintp.adb b/gcc/ada/uintp.adb
index 948c521b..6fdf02f 100644
--- a/gcc/ada/uintp.adb
+++ b/gcc/ada/uintp.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2016, 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- --
@@ -2229,9 +2229,12 @@ package body Uintp is
begin
-- Uints of more than one digit could be outside the range for
-- Ints. Caller should have checked for this if not certain.
- -- Fatal error to attempt to convert from value outside Int'Range.
+ -- Constraint_Error to attempt to convert from value outside
+ -- Int'Range.
- pragma Assert (UI_Is_In_Int_Range (Input));
+ if not UI_Is_In_Int_Range (Input) then
+ raise Constraint_Error;
+ end if;
-- Otherwise, proceed ahead, we are OK