summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch10.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 13:54:30 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 13:54:30 +0000
commit6fdfe796f36aced9729bfb4cbbe0b7ebe3455b97 (patch)
tree730356f0f97d8da4ff35bf55f0a7fb7f6e7f8da2 /gcc/ada/sem_ch10.adb
parente78165626493d2c5c8cebb1231e856bf67bb9020 (diff)
downloadgcc-6fdfe796f36aced9729bfb4cbbe0b7ebe3455b97.tar.gz
2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch7.adb: Fix minor oversight in condition. 2014-08-01 Bob Duff <duff@adacore.com> * projects.texi: Minor documentation improvements. 2014-08-01 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All. * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect. * lib-load.adb: Initialize No_Elab_Code_All field. * lib-writ.adb: Initialize No_Elab_Code_All. * lib.ads, lib.adb: New field No_Elab_Code_All. * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All. * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no longer exists. * sem_ch10.adb (Analyze_Context): Processing for No_Elaboration_Code_All removed. (Generate_Parent_References): Moved to Sem_Util. * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All. * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from Sem_Ch10. * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All. * targparm.adb: Minor comment updates Add comments on ignoring pragma No_Elaboration_Code_All. 2014-08-01 Nicolas Roche <roche@adacore.com> * adaint.c (__gnat_set_close_on_exec): Ensure that we can unset "close_on_exec" flag. 2014-08-01 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building the parameter specs of the wrapper program for a primitive operation of a synchronized type that implements an interface, copy the null_exclusion indicator as well. 2014-08-01 Robert Dewar <dewar@adacore.com> * sem_eval.ads: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213466 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch10.adb')
-rw-r--r--gcc/ada/sem_ch10.adb51
1 files changed, 2 insertions, 49 deletions
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index a3c6784be2c..63d83729369 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -3,7 +3,7 @@
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ C H 1 0 --
--- s --
+-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, Free Software Foundation, Inc. --
@@ -109,13 +109,6 @@ package body Sem_Ch10 is
-- and of subunits. N is a defining_program_unit_name, and P_Id is the
-- immediate parent scope.
- function Get_Parent_Entity (Unit : Node_Id) return Entity_Id;
- -- Get defining entity of parent unit of a child unit. In most cases this
- -- is the defining entity of the unit, but for a child instance whose
- -- parent needs a body for inlining, the instantiation node of the parent
- -- has not yet been rewritten as a package declaration, and the entity has
- -- to be retrieved from the Instance_Spec of the unit.
-
function Has_With_Clause
(C_Unit : Node_Id;
Pack : Entity_Id;
@@ -1327,7 +1320,7 @@ package body Sem_Ch10 is
-- a) The first pass analyzes non-limited with-clauses and also any
-- configuration pragmas (we need to get the latter analyzed right
- -- away, since they can affect processing of subsequent items.
+ -- away, since they can affect processing of subsequent items).
-- b) The second pass analyzes limited_with clauses (Ada 2005: AI-50217)
@@ -1351,28 +1344,6 @@ package body Sem_Ch10 is
if Library_Unit (Item) /= Cunit (Current_Sem_Unit) then
Analyze (Item);
- -- This is the point at which we check for the case of an
- -- improper WITH from a unit with No_Elaboration_Code_All.
-
- if No_Elab_Code (Current_Sem_Unit) >=
- No_Elab_Code_All_Warn
- then
- if No_Elab_Code
- (Get_Source_Unit (Library_Unit (Item))) /=
- No_Elab_Code_All
- then
- Error_Msg_Warn :=
- No_Elab_Code (Current_Sem_Unit) =
- No_Elab_Code_All_Warn;
- Error_Msg_N
- ("<unit with No_Elaboration_Code_All has bad WITH",
- Item);
- Error_Msg_NE
- ("\<unit& does not have No_Elaboration_Code_All",
- Item, Entity (Name (Item)));
- end if;
- end if;
-
-- Here for the case of a useless with for the main unit
else
@@ -3150,24 +3121,6 @@ package body Sem_Ch10 is
end if;
end Generate_Parent_References;
- -----------------------
- -- Get_Parent_Entity --
- -----------------------
-
- function Get_Parent_Entity (Unit : Node_Id) return Entity_Id is
- begin
- if Nkind (Unit) = N_Package_Body
- and then Nkind (Original_Node (Unit)) = N_Package_Instantiation
- then
- return Defining_Entity
- (Specification (Instance_Spec (Original_Node (Unit))));
- elsif Nkind (Unit) = N_Package_Instantiation then
- return Defining_Entity (Specification (Instance_Spec (Unit)));
- else
- return Defining_Entity (Unit);
- end if;
- end Get_Parent_Entity;
-
---------------------
-- Has_With_Clause --
---------------------