comparison gcc/ada/checks.ads @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
4 -- -- 4 -- --
5 -- C H E C K S -- 5 -- C H E C K S --
6 -- -- 6 -- --
7 -- S p e c -- 7 -- S p e c --
8 -- -- 8 -- --
9 -- Copyright (C) 1992-2017, Free Software Foundation, Inc. -- 9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
10 -- -- 10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under -- 11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- -- 12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- 13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
308 -- N is a node for a subexpression. If N is of a discrete type with no 308 -- N is a node for a subexpression. If N is of a discrete type with no
309 -- error indications, and no other peculiarities (e.g. missing Etype), 309 -- error indications, and no other peculiarities (e.g. missing Etype),
310 -- then OK is True on return, and Lo and Hi are set to a conservative 310 -- then OK is True on return, and Lo and Hi are set to a conservative
311 -- estimate of the possible range of values of N. Thus if OK is True on 311 -- estimate of the possible range of values of N. Thus if OK is True on
312 -- return, the value of the subexpression N is known to lie in the range 312 -- return, the value of the subexpression N is known to lie in the range
313 -- Lo .. Hi (inclusive). If the expression is not of a discrete type, or 313 -- Lo .. Hi (inclusive). For enumeration and character literals the values
314 -- some kind of error condition is detected, then OK is False on exit, and 314 -- returned are the Pos value in the relevant enumeration type. If the
315 -- Lo/Hi are set to No_Uint. Thus the significance of OK being False on 315 -- expression is not of a discrete type, or some kind of error condition
316 -- return is that no useful information is available on the range of the 316 -- is detected, then OK is False on exit, and Lo/Hi are set to No_Uint.
317 -- expression. Assume_Valid determines whether the processing is allowed to 317 -- Thus the significance of OK being False on return is that no useful
318 -- assume that values are in range of their subtypes. If it is set to True, 318 -- information is available on the range of the expression. Assume_Valid
319 -- then this assumption is valid, if False, then processing is done using 319 -- determines whether the processing is allowed to assume that values are
320 -- base types to allow invalid values. 320 -- in range of their subtypes. If it is set to True, then this assumption
321 -- is valid, if False, then processing is done using base types to allow
322 -- invalid values.
321 323
322 procedure Determine_Range_R 324 procedure Determine_Range_R
323 (N : Node_Id; 325 (N : Node_Id;
324 OK : out Boolean; 326 OK : out Boolean;
325 Lo : out Ureal; 327 Lo : out Ureal;