aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-23 12:21:23 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-23 12:21:23 +0200
commit1d57c04fd72d5ab77242be1877aec05d2674c467 (patch)
treea82de8e522d4d4bab28350616d6c574da4a01f9b /gcc/ada/sem_ch13.adb
parentb91fccb300b34982baaf684c25d4d973df16fb4f (diff)
downloadgcc-1d57c04fd72d5ab77242be1877aec05d2674c467.zip
gcc-1d57c04fd72d5ab77242be1877aec05d2674c467.tar.gz
gcc-1d57c04fd72d5ab77242be1877aec05d2674c467.tar.bz2
[multiple changes]
2010-06-23 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Check_Constant_Address_Clauses): Do not check legality of address clauses if if Ignore_Rep_Clauses is active. * freeze.adb (Check_Address_Clause): If Ignore_Rep_Clauses is active, remove address clause from tree so that it does not reach the backend. 2010-06-23 Arnaud Charlet <charlet@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]): Do not expand 'Valid from user code in CodePeer mode, will be handled by the back-end directly. 2010-06-23 Bob Duff <duff@adacore.com> * g-comlin.ads: Minor comment improvements. 2010-06-23 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Uses_SS): The expression that initializes a controlled component of a record type may be a user-defined operator that is rewritten as a function call. From-SVN: r161271
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index ad51258..8b1d60a 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -3138,7 +3138,14 @@ package body Sem_Ch13 is
-- Start of processing for Check_Constant_Address_Clause
begin
- Check_Expr_Constants (Expr);
+ -- If rep_clauses are to be ignored, no need for legality checks. In
+ -- particular, no need to pester user about rep clauses that violate
+ -- the rule on constant addresses, given that these clauses will be
+ -- removed by Freeze before they reach the back end.
+
+ if not Ignore_Rep_Clauses then
+ Check_Expr_Constants (Expr);
+ end if;
end Check_Constant_Address_Clause;
----------------------------------------