diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-13 11:01:38 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-13 11:01:38 +0100 |
commit | 66340e0e9a029aa5cbba0e63f66e5319c1286ce4 (patch) | |
tree | 12f33f495cd3ec7d0d45593615bbbfd492d8805c /gcc/ada/checks.adb | |
parent | 27bb79414764b83bf6c7208d6081afd01f98869f (diff) | |
download | gcc-66340e0e9a029aa5cbba0e63f66e5319c1286ce4.zip gcc-66340e0e9a029aa5cbba0e63f66e5319c1286ce4.tar.gz gcc-66340e0e9a029aa5cbba0e63f66e5319c1286ce4.tar.bz2 |
[multiple changes]
2017-01-13 Tristan Gingold <gingold@adacore.com>
* s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
(Open_Read): Re-implement using Open_Read_No_Exception.
(Open_Write): Raise exception in case of error.
* s-mmosin-mingw.adb (Open_Common): Do not raise exception.
* s-mmosin-unix.adb (Open_Read, Open_Write): Do not
reaise exception.
* s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
2017-01-13 Yannick Moy <moy@adacore.com>
* checks.adb: Code cleanup.
2017-01-13 Yannick Moy <moy@adacore.com>
* freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
expression instead of unanalyzed aspect expression for checking
the validity of inheriting an operation. Also copy the expression
being passing it to Build_Class_Wide_Expression, as this call
modifies its argument.
* sem_util.ads Fix comment to reference correct function name
New_Copy_Tree.
2017-01-13 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
when we propagate information about the indexes back to the original
indexing mode and the prefix of the index is a function call, do not
remove any parameter from such call.
2017-01-13 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
* exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
a build-in-place function whose result type is tagged.
2017-01-13 Yannick Moy <moy@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
Do not generate a wrapper when the only candidate is a class-wide
subprogram.
(Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
inside a generic context.
From-SVN: r244399
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r-- | gcc/ada/checks.adb | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 6689cb5..6913e8f 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -337,6 +337,10 @@ package body Checks is -- Like Apply_Selected_Length_Checks, except it doesn't modify -- anything, just returns a list of nodes as described in the spec of -- this package for the Range_Check function. + -- ??? In fact it does construct the test and insert it into the tree, + -- and insert actions in various ways (calling Insert_Action directly + -- in particular) so we do not call it in GNATprove mode, contrary to + -- Selected_Range_Checks. function Selected_Range_Checks (Ck_Node : Node_Id; @@ -3085,25 +3089,18 @@ package body Checks is or else (not Length_Checks_Suppressed (Target_Typ)); begin - -- Only apply checks when generating code. In GNATprove mode, we do - -- not apply the checks, but we still call Selected_Length_Checks to - -- possibly issue errors on SPARK code when a run-time error can be - -- detected at compile time. + -- Only apply checks when generating code -- Note: this means that we lose some useful warnings if the expander -- is not active. - if not Expander_Active and not GNATprove_Mode then + if not Expander_Active then return; end if; R_Result := Selected_Length_Checks (Ck_Node, Target_Typ, Source_Typ, Empty); - if GNATprove_Mode then - return; - end if; - for J in 1 .. 2 loop R_Cno := R_Result (J); exit when No (R_Cno); @@ -9082,12 +9079,9 @@ package body Checks is -- Start of processing for Selected_Length_Checks begin - -- Checks will be applied only when generating code. In GNATprove mode, - -- we do not apply the checks, but we still call Selected_Length_Checks - -- to possibly issue errors on SPARK code when a run-time error can be - -- detected at compile time. + -- Checks will be applied only when generating code - if not Expander_Active and not GNATprove_Mode then + if not Expander_Active then return Ret_Result; end if; |