diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-28 15:34:44 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-28 15:34:44 +0200 |
commit | 99f8abb6afb37c687776b61eedd8fd6b62c71b76 (patch) | |
tree | 6570ebb74b434c3443991c89bff75aba7503646a | |
parent | 1f8766d3c372ad50e9015abe22da2187d1e71c01 (diff) | |
download | gcc-99f8abb6afb37c687776b61eedd8fd6b62c71b76.zip gcc-99f8abb6afb37c687776b61eedd8fd6b62c71b76.tar.gz gcc-99f8abb6afb37c687776b61eedd8fd6b62c71b76.tar.bz2 |
[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
-rw-r--r-- | gcc/ada/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ada/a-cforse.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 14 |
3 files changed, 21 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index af97683..6126ee7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +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> * exp_ch9.adb (Build_Lock_Free_Unprotected_Subprogram_Body): Also diff --git a/gcc/ada/a-cforse.adb b/gcc/ada/a-cforse.adb index b386c52..6c7f8e4 100644 --- a/gcc/ada/a-cforse.adb +++ b/gcc/ada/a-cforse.adb @@ -251,7 +251,7 @@ is Node => Target_Node); end Append_Element; - -- Start of processing for Assign + -- Start of processing for Assign begin if Target'Address = Source'Address then diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 41f6f16..7a50fd2 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -12883,11 +12883,15 @@ package body Sem_Util is -- unconstrained aliased object, whereas in Ada 95 the designated -- object is guaranteed to be constrained. A worst-case assumption -- has to apply in Ada 2005 because we can't tell at compile - -- 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 - -- rules (these rules are acknowledged to need fixing). - - if Ada_Version < Ada_2005 then + -- 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 + -- rules (these rules are acknowledged to need fixing). We don't + -- impose this more stringent checking for earlier Ada versions or + -- 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) or else Nkind (P) = N_Explicit_Dereference then |