aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-06-16 11:52:17 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-06-16 11:52:17 +0200
commita8a42b933c5dc135080120d0a1d115c602a328fb (patch)
tree4e3a1428b51984b87462326c45d6de2571028f17 /gcc/ada/sem_util.ads
parentfb757f7da43d13603d3d8b821f62076336e412a9 (diff)
downloadgcc-a8a42b933c5dc135080120d0a1d115c602a328fb.zip
gcc-a8a42b933c5dc135080120d0a1d115c602a328fb.tar.gz
gcc-a8a42b933c5dc135080120d0a1d115c602a328fb.tar.bz2
[multiple changes]
2016-06-16 Javier Miranda <miranda@adacore.com> * sem_res.adb (Resolve): Under relaxed RM semantics silently replace occurrences of null by System.Null_Address. * sem_ch4.adb (Analyze_One_Call, Operator_Check): Under relaxed RM semantics silently replace occurrences of null by System.Null_Address. * sem_util.ad[sb] (Null_To_Null_Address_Convert_OK): New subprogram. (Replace_Null_By_Null_Address): New subprogram. 2016-06-16 Bob Duff <duff@adacore.com> * exp_util.adb (Is_Controlled_Function_Call): This was missing the case where the call is in prefix format, with named notation, as in Obj.Func (Formal => Actual). From-SVN: r237508
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r--gcc/ada/sem_util.ads13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index b953669..b62fe77 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -1933,6 +1933,14 @@ package Sem_Util is
-- (e.g. target of assignment, or out parameter), and to False if the
-- modification is only potential (e.g. address of entity taken).
+ function Null_To_Null_Address_Convert_OK
+ (N : Node_Id;
+ Typ : Entity_Id := Empty) return Boolean;
+ -- Return True if we are compiling in relaxed RM semantics mode and:
+ -- 1) N is a N_Null node and Typ is a decendant of System.Address, or
+ -- 2) N is a comparison operator, one of the operands is null and the
+ -- type of the other operand is a descendant of System.Address.
+
function Object_Access_Level (Obj : Node_Id) return Uint;
-- Return the accessibility level of the view of the object Obj. For
-- convenience, qualified expressions applied to object names are also
@@ -2044,6 +2052,11 @@ package Sem_Util is
function Remove_Suffix (E : Entity_Id; Suffix : Character) return Name_Id;
-- Returns the name of E without Suffix
+ procedure Replace_Null_By_Null_Address (N : Node_Id);
+ -- N is N_Null or a binary comparison operator, we are compiling in relaxed
+ -- RM semantics mode and one of the operands is null. Replace null by
+ -- System.Null_Address.
+
function Rep_To_Pos_Flag (E : Entity_Id; Loc : Source_Ptr) return Node_Id;
-- This is used to construct the second argument in a call to Rep_To_Pos
-- which is Standard_True if range checks are enabled (E is an entity to