Commit 99f8abb6 by Arnaud Charlet

[multiple changes]

2017-04-28  Gary Dismukes  <dismukes@adacore.com>

	* sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
	Relaxed_RM_Semantics to avoid having CodePeer issue errors on
	code that might violate the more stringent checking for 'Access
	introduced in Ada 2005.

2017-04-28  Arnaud Charlet  <charlet@adacore.com>

	* a-cforse.adb: minor style fix in comment.

From-SVN: r247386
parent 1f8766d3
2017-04-28 Gary Dismukes <dismukes@adacore.com>
* sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Test
Relaxed_RM_Semantics to avoid having CodePeer issue errors on
code that might violate the more stringent checking for 'Access
introduced in Ada 2005.
2017-04-28 Arnaud Charlet <charlet@adacore.com>
* a-cforse.adb: minor style fix in comment.
2017-04-28 Eric Botcazou <ebotcazou@adacore.com> 2017-04-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also
......
...@@ -251,7 +251,7 @@ is ...@@ -251,7 +251,7 @@ is
Node => Target_Node); Node => Target_Node);
end Append_Element; end Append_Element;
-- Start of processing for Assign -- Start of processing for Assign
begin begin
if Target'Address = Source'Address then if Target'Address = Source'Address then
......
...@@ -12883,11 +12883,15 @@ package body Sem_Util is ...@@ -12883,11 +12883,15 @@ package body Sem_Util is
-- unconstrained aliased object, whereas in Ada 95 the designated -- unconstrained aliased object, whereas in Ada 95 the designated
-- object is guaranteed to be constrained. A worst-case assumption -- object is guaranteed to be constrained. A worst-case assumption
-- has to apply in Ada 2005 because we can't tell at compile -- has to apply in Ada 2005 because we can't tell at compile
-- time whether the object is "constrained by its initial value" -- time whether the object is "constrained by its initial value",
-- (despite the fact that 3.10.2(26/2) and 8.5.1(5/2) are semantic -- despite the fact that 3.10.2(26/2) and 8.5.1(5/2) are semantic
-- rules (these rules are acknowledged to need fixing). -- rules (these rules are acknowledged to need fixing). We don't
-- impose this more stringent checking for earlier Ada versions or
if Ada_Version < Ada_2005 then -- when Relaxed_RM_Semantics applies (the latter for CodePeer's
-- benefit, though it's unclear on why using -gnat95 would not be
-- sufficient???).
if Ada_Version < Ada_2005 or else Relaxed_RM_Semantics then
if Is_Access_Type (Prefix_Type) if Is_Access_Type (Prefix_Type)
or else Nkind (P) = N_Explicit_Dereference or else Nkind (P) = N_Explicit_Dereference
then then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment