aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2013-07-08 10:15:25 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2013-07-08 10:15:25 +0200
commit2cbac6c692b9a68e9fedaa193ae756eea8ac23c5 (patch)
tree50c5674f4b0dc7891f7116f7ee46b8a75f9b73f7 /gcc/ada/lib.ads
parentd7a3e18ca87744c3bd293396952a7ff36412d1ce (diff)
downloadgcc-2cbac6c692b9a68e9fedaa193ae756eea8ac23c5.zip
gcc-2cbac6c692b9a68e9fedaa193ae756eea8ac23c5.tar.gz
gcc-2cbac6c692b9a68e9fedaa193ae756eea8ac23c5.tar.bz2
[multiple changes]
2013-07-08 Robert Dewar <dewar@adacore.com> * sem.ads: Minor comment updates. * s-restri.ads, exp_ch6.adb, lib-load.ads, exp_ch3.adb, sem_ch10.adb: Minor reformatting. 2013-07-08 Robert Dewar <dewar@adacore.com> * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry for Restriction_Set. * gnat_rm.texi: Add missing menu entry for Attribute Ref Add documentation for attribute Restriction_Set. * lib-writ.adb (Write_With_Lines): Generate special W lines for Restriction_Set. * lib-writ.ads: Document special use of W lines for Restriction_Set. * lib.ads (Restriction_Set_Dependences): New table. * par-ch4.adb (Is_Parameterless_Attribute): Add Loop_Entry to list (Scan_Name_Extension_Apostrophe): Remove kludge test for Loop_Entry (Scan_Name_Extension_Apostrophe): Handle No_Dependence for Restricton_Set. * restrict.adb (Check_SPARK_Restriction): Put in Alfa order (OK_No_Dependence_Unit_Name): New function. * restrict.ads (OK_No_Dependence_Unit_Name): New function. * rtsfind.adb: Minor reformatting Minor code reorganization. * sem_attr.adb (Analyze_Attribute): Add processing for Restriction_Set. * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Remove Check_Unit_Name and use new function OK_No_Dependence_Unit_Name instead. * sinfo.ads: Minor comment updates. * snames.ads-tmpl: Add entry for Restriction_Set attribute. 2013-07-08 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Apply_Accessibility_Check): Remove local constant Pool_Id and local variable Free_Stmt. Do not deallocate the faulty object as "free" is not available on all targets/profiles. 2013-07-08 Robert Dewar <dewar@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Handle Storage_Size aspect for task type in case discriminant is referenced. (Analyze_Attribute_Definition_Clause): Do not flag Storage_Size attribute definition clause as obsolescent if from aspect. From-SVN: r200771
Diffstat (limited to 'gcc/ada/lib.ads')
-rw-r--r--gcc/ada/lib.ads36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/ada/lib.ads b/gcc/ada/lib.ads
index ac1945e..5370e4a 100644
--- a/gcc/ada/lib.ads
+++ b/gcc/ada/lib.ads
@@ -688,6 +688,42 @@ package Lib is
-- of the printout. If Withs is True, we print out units with'ed by this
-- unit (not counting limited withs).
+ ---------------------------------------------------------------
+ -- Special Handling for Restriction_Set (No_Dependence) Case --
+ ---------------------------------------------------------------
+
+ -- If we have a Restriction_Set attribute for No_Dependence => unit,
+ -- and the unit is not given in a No_Dependence restriction that we
+ -- can see, the attribute will return False.
+
+ -- We have to ensure in this case that the binder will reject any attempt
+ -- to set a No_Dependence restriction in some other unit in the partition.
+
+ -- If the unit is in the semantic closure, then of course it is properly
+ -- WITH'ed by someone, and the binder will do this job automatically as
+ -- part of its normal processing.
+
+ -- But if the unit is not in the semantic closure, we must make sure the
+ -- binder knows about it. The use of the Restriction_Set attribute giving
+ -- a result of False does not mean of itself that we have to include the
+ -- unit in the partition. So what we do is to generate a with (W) line in
+ -- the ali file (with no file name information), but no corresponding D
+ -- (dependency) line. This is recognized by the binder as meaning "Don't
+ -- let anyone specify No_Dependence for this unit, but you don't have to
+ -- include it if there is no real W line for the unit".
+
+ -- The following table keeps track of relevant units. It is used in the
+ -- Lib.Writ circuit for outputting With lines to output the special with
+ -- line with RA if the unit is not in the semantic closure.
+
+ package Restriction_Set_Dependences is new Table.Table (
+ Table_Component_Type => Unit_Name_Type,
+ Table_Index_Type => Int,
+ Table_Low_Bound => 0,
+ Table_Initial => 10,
+ Table_Increment => 100,
+ Table_Name => "Restriction_Attribute_Dependences");
+
private
pragma Inline (Cunit);
pragma Inline (Cunit_Entity);