diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-04 09:57:00 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-04 09:57:00 +0000 |
commit | c8e92b5f17ec9e6461f1479c5cb1737d74465402 (patch) | |
tree | f018ecd5df9867a82b2f011873e67be25b6d4580 /gcc/ada/checks.ads | |
parent | 9da4342a945a58fd05e78af1a85b442849048924 (diff) | |
download | gcc-c8e92b5f17ec9e6461f1479c5cb1737d74465402.tar.gz |
2014-08-04 Vincent Celier <celier@adacore.com>
* prj-dect.adb (Parse_Case_Construction): It is no longer
an error if the variable for a case construction is not
typed, only if the variable value is not a single string. Call
Parse_Choice_List and End_Case_Construction with the new parameter
to indicate that the variable is typed.
* prj-strt.adb (End_Case_Construction): Only check the labels
if the variable is typed. If the variable is not typed,
issue a warning when there is no "when others" allternative.
(Parse_Choice_List): Manage the labels only if the variable
is typed.
* prj-strt.ads (End_Case_Construction): New Boolean parameter
String_Type.
(Parse_Choice_List): Ditto.
2014-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb: Additional fix to Check_Predicate_Use.
2014-08-04 Vincent Celier <celier@adacore.com>
* projects.texi: Update documentation of case constructions with
variables that are not typed.
2014-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
an Eliminated pragma, indicate that the wrapper is also to be
eliminated, to prevent spurious errors when using gnatelim on
programs that include box-initialization of equality operators
(consequence of AI05-071)..
2014-08-04 Robert Dewar <dewar@adacore.com>
* checks.adb (Activate_Overflow_Check): Handle floating-point
case correctly.
* checks.ads (Activate_Overflow_Check): Clarify handling of
floating-point cases.
* exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
flag if we generate an explicit overflow check (for
Check_Float_Overflow mode).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213550 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/checks.ads')
-rw-r--r-- | gcc/ada/checks.ads | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ada/checks.ads b/gcc/ada/checks.ads index 9362550b382..2dca67e1c4a 100644 --- a/gcc/ada/checks.ads +++ b/gcc/ada/checks.ads @@ -145,10 +145,19 @@ package Checks is -- Sets Do_Overflow_Check flag in node N, and handles possible local raise. -- Always call this routine rather than calling Set_Do_Overflow_Check to -- set an explicit value of True, to ensure handling the local raise case. - -- Note that this call has no effect for MOD, REM, and unary "+" for which - -- overflow is never possible in any case. In addition, we do not set the - -- flag for unconstrained floating-point type operations, since we want to - -- allow for the generation of IEEE infinities in such cases. + -- Note that for discrete types, this call has no effect for MOD, REM, and + -- unary "+" for which overflow is never possible in any case. + -- + -- Note: for the discrete-type case, it is legitimate to call this routine + -- on an unanalyzed node where the Etype field is not set. However, for the + -- floating-point case, Etype must be set (to a floating-point type). + -- + -- For floating-point, we set the flag if we have automatic overflow checks + -- on the target, or if Check_Float_Overflow mode is set. For the floating- + -- point case, we ignore all the unary operators ("+", "-", and abs) since + -- none of these can result in overflow. If there are no overflow checks on + -- the target, and Check_Float_Overflow mode is not set, then the call has + -- no effect, since in such cases we want to generate NaN's and infinities. procedure Activate_Range_Check (N : Node_Id); pragma Inline (Activate_Range_Check); |