diff options
author | Robert Dewar <dewar@adacore.com> | 2010-09-09 09:57:00 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-09-09 11:57:00 +0200 |
commit | 7a963087d4ac84018143595d1a61c008453b70bd (patch) | |
tree | 3d96305a5fd5eb104053e32acb56c0321908d12f /gcc/ada/restrict.adb | |
parent | 61bcf5ca33e9ea22001c1283a9ea0df5bcae2ecc (diff) | |
download | gcc-7a963087d4ac84018143595d1a61c008453b70bd.zip gcc-7a963087d4ac84018143595d1a61c008453b70bd.tar.gz gcc-7a963087d4ac84018143595d1a61c008453b70bd.tar.bz2 |
sem_ch13.adb, [...]: Minor reformatting.
2010-09-09 Robert Dewar <dewar@adacore.com>
* sem_ch13.adb, sem_ch6.adb, exp_ch3.adb: Minor reformatting.
2010-09-09 Robert Dewar <dewar@adacore.com>
* einfo.adb (Is_Aggregate_Type): New function.
* einfo.ads (Aggregate_Kind): New enumeration subtype
(Is_Aggregate_Type): New function.
* sem_type.adb (Is_Array_Class_Record_Type): Removed, replaced by
Is_Aggregate_Typea.
2010-09-09 Robert Dewar <dewar@adacore.com>
* exp_ch11.adb, frontend.adb, sem_attr.adb, sem_ch10.adb, sem_ch3.adb,
sem_ch4.adb, sem_ch9.adb, sem_res.adb: Use Restriction_Check_Needed
where appropriate.
* restrict.ads, restrict.adb: Ditto.
(Restriction_Check_Needed): New function
From-SVN: r164061
Diffstat (limited to 'gcc/ada/restrict.adb')
-rw-r--r-- | gcc/ada/restrict.adb | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/ada/restrict.adb b/gcc/ada/restrict.adb index 229369e..c08130a 100644 --- a/gcc/ada/restrict.adb +++ b/gcc/ada/restrict.adb @@ -144,8 +144,8 @@ package body Restrict is -- Start of processing for Check_Obsolescent_2005_Entity begin - if Ada_Version >= Ada_2005 - and then Restriction_Active (No_Obsolescent_Features) + if Restriction_Check_Required (No_Obsolescent_Features) + and then Ada_Version >= Ada_2005 and then Chars_Is (Scope (E), "handling") and then Chars_Is (Scope (Scope (E)), "characters") and then Chars_Is (Scope (Scope (Scope (E))), "ada") @@ -298,8 +298,8 @@ package body Restrict is -- Start of processing for Check_Restriction begin - -- In CodePeer mode, we do not want to check for any restriction, or - -- set additional restrictions than those already set in gnat1drv.adb + -- In CodePeer mode, we do not want to check for any restriction, or set + -- additional restrictions other than those already set in gnat1drv.adb -- so that we have consistency between each compilation. if CodePeer_Mode then @@ -403,7 +403,7 @@ package body Restrict is procedure Check_Wide_Character_Restriction (E : Entity_Id; N : Node_Id) is begin - if Restriction_Active (No_Wide_Characters) + if Restriction_Check_Required (No_Wide_Characters) and then Comes_From_Source (N) then declare @@ -586,6 +586,15 @@ package body Restrict is return Restrictions.Set (R) and then not Restriction_Warnings (R); end Restriction_Active; + -------------------------------- + -- Restriction_Check_Required -- + -------------------------------- + + function Restriction_Check_Required (R : All_Restrictions) return Boolean is + begin + return Restrictions.Set (R); + end Restriction_Check_Required; + --------------------- -- Restriction_Msg -- --------------------- |