aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-10-26 12:17:42 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-26 12:17:42 +0100
commit21d7ef70aae92c62a6c39233e899b9ed70ace566 (patch)
tree582d1c2afaba5d035f73c43da9e2c038b6dcae62 /gcc/ada/sem_ch12.adb
parent2ba4f1fb6ecf07b7779910035d0ff75982d383fb (diff)
downloadgcc-21d7ef70aae92c62a6c39233e899b9ed70ace566.zip
gcc-21d7ef70aae92c62a6c39233e899b9ed70ace566.tar.gz
gcc-21d7ef70aae92c62a6c39233e899b9ed70ace566.tar.bz2
[multiple changes]
2015-10-26 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Case_Expression): In the scope of a predicate function, delay the expansion of the expression only if the target type has a specified Static_ Predicate aspect, because the expression is processed later. A dynamic predicate must be expanded in standard fashion. 2015-10-26 Claire Dross <dross@adacore.com> * a-nudira.ads: Remove SPARK_Mode as it currently causes an error. 2015-10-26 Arnaud Charlet <charlet@adacore.com> * sem_aggr.adb, sem_type.adb, sem_ch12.adb, sem_res.adb, sem_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb, s-fatgen.adb, a-tienio.adb: Fix typos. 2015-10-26 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): The processing for aspects Abstract_State, Ghost, Initial_Condition, Initializes and Refined_State no longer have to take SPARK_Mode into account. (Insert_After_SPARK_Mode): Removed. (Insert_Pragma): Update profile and comment on usage. The routine can now insert a pragma after the "header" of an instance. * sem_prag.adb (Analyze_If_Available): New routine. (Analyze_Pragma): Do not reset the Analyzed flag of various SPARK pragmas as they use the Is_Analyzed_Pragma attribute to avoid reanalysis. Various pragmas now trigger the analysis of related pragmas that depend on or are dependent on the current pragma. Remove the declaration order checks related to pragmas Abstract_State, Initial_Condition and Initializes. (Analyze_Pre_Post_Condition): Analyze pragmas SPARK_Mode and Volatile_Function prior to analyzing the pre/postcondition. (Check_Declaration_Order): Removed. (Check_Distinct_Name): Ensure that a potentially duplicated pragma Test_Case is not the pragma being analyzed. (Is_Followed_By_Pragma): Removed. From-SVN: r229331
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb34
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 7d52d2e..bb4095b 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -149,7 +149,7 @@ package body Sem_Ch12 is
-- However, for private types, this by itself does not insure that the
-- proper VIEW of the entity is used (the full type may be visible at the
-- point of generic definition, but not at instantiation, or vice-versa).
- -- In order to reference the proper view, we special-case any reference
+ -- In order to reference the proper view, we special-case any reference
-- to private types in the generic object, by saving both views, one in
-- the generic and one in the semantic copy. At time of instantiation, we
-- check whether the two views are consistent, and exchange declarations if
@@ -708,7 +708,7 @@ package body Sem_Ch12 is
-- If the instantiation happens textually before the body of the generic,
-- the instantiation of the body must be analyzed after the generic body,
-- and not at the point of instantiation. Such early instantiations can
- -- happen if the generic and the instance appear in a package declaration
+ -- happen if the generic and the instance appear in a package declaration
-- because the generic body can only appear in the corresponding package
-- body. Early instantiations can also appear if generic, instance and
-- body are all in the declarative part of a subprogram or entry. Entities
@@ -807,7 +807,7 @@ package body Sem_Ch12 is
-- Within the generic part, entities in the formal package are
-- visible. To validate subsequent type declarations, indicate
-- the correspondence between the entities in the analyzed formal,
- -- and the entities in the actual package. There are three packages
+ -- and the entities in the actual package. There are three packages
-- involved in the instantiation of a formal package: the parent
-- generic P1 which appears in the generic declaration, the fake
-- instantiation P2 which appears in the analyzed generic, and whose
@@ -1101,8 +1101,8 @@ package body Sem_Ch12 is
-- include an Others clause.
procedure Process_Default (F : Entity_Id);
- -- Add a copy of the declaration of generic formal F to the list of
- -- associations, and add an explicit box association for F if there
+ -- Add a copy of the declaration of generic formal F to the list of
+ -- associations, and add an explicit box association for F if there
-- is none yet, and the default comes from an Others_Choice.
function Renames_Standard_Subprogram (Subp : Entity_Id) return Boolean;
@@ -1268,7 +1268,7 @@ package body Sem_Ch12 is
-- insert actuals for those defaults, and cannot rely on their
-- names to disambiguate them.
- if Actual = First_Named then
+ if Actual = First_Named then
Next (First_Named);
elsif Present (Actual) then
@@ -2883,7 +2883,7 @@ package body Sem_Ch12 is
end if;
-- Default name may be overloaded, in which case the interpretation
- -- with the correct profile must be selected, as for a renaming.
+ -- with the correct profile must be selected, as for a renaming.
-- If the definition is an indexed component, it must denote a
-- member of an entry family. If it is a selected component, it
-- can be a protected operation.
@@ -4600,14 +4600,14 @@ package body Sem_Ch12 is
Scope_Stack.Table (Scope_Stack.Last - J + 1).First_Use_Clause :=
Use_Clauses (J);
Install_Use_Clauses (Use_Clauses (J));
- end loop;
+ end loop;
else
for J in reverse 1 .. Num_Scopes loop
Scope_Stack.Table (Scope_Stack.Last - J + 1).First_Use_Clause :=
Use_Clauses (J);
Install_Use_Clauses (Use_Clauses (J));
- end loop;
+ end loop;
end if;
-- Restore status of instances. If one of them is a body, make its
@@ -5897,7 +5897,7 @@ package body Sem_Ch12 is
and then not Comes_From_Source (E1)
and then Chars (E1) /= Chars (E2)
then
- while Present (E1) and then Chars (E1) /= Chars (E2) loop
+ while Present (E1) and then Chars (E1) /= Chars (E2) loop
Next_Entity (E1);
end loop;
end if;
@@ -7695,14 +7695,14 @@ package body Sem_Ch12 is
begin
E1 := First_Entity (P);
- while Present (E1) and then E1 /= Instance loop
+ while Present (E1) and then E1 /= Instance loop
if Ekind (E1) = E_Package
and then Nkind (Parent (E1)) = N_Package_Renaming_Declaration
then
if Renamed_Object (E1) = Pack then
return True;
- elsif E1 = P or else Renamed_Object (E1) = P then
+ elsif E1 = P or else Renamed_Object (E1) = P then
return False;
elsif Is_Actual_Of_Previous_Formal (E1) then
@@ -8724,7 +8724,7 @@ package body Sem_Ch12 is
if Scop = Par_I then
null;
- -- If the next node is a source body we must freeze in
+ -- If the next node is a source body we must freeze in
-- the current scope as well.
elsif Present (Next (N))
@@ -9472,7 +9472,7 @@ package body Sem_Ch12 is
-- same order.
function Get_Formal_Entity (N : Node_Id) return Entity_Id;
- -- Retrieve entity of defining entity of generic formal parameter.
+ -- Retrieve entity of defining entity of generic formal parameter.
-- Only the declarations of formals need to be considered when
-- linking them to actuals, but the declarative list may include
-- internal entities generated during analysis, and those are ignored.
@@ -9571,7 +9571,7 @@ package body Sem_Ch12 is
Actual := Entity (Name (Original_Node (Formal_Node)));
- -- The actual in the formal package declaration may be a
+ -- The actual in the formal package declaration may be a
-- renamed generic package, in which case we want to retrieve
-- the original generic in order to traverse its formal part.
@@ -9710,7 +9710,7 @@ package body Sem_Ch12 is
Analyze (Actual);
if not Is_Entity_Name (Actual)
- or else Ekind (Entity (Actual)) /= E_Package
+ or else Ekind (Entity (Actual)) /= E_Package
then
Error_Msg_N
("expect package instance to instantiate formal", Actual);
@@ -12259,7 +12259,7 @@ package body Sem_Ch12 is
end if;
-- Verify that limitedness matches. If parent is a limited
- -- interface then the generic formal is not unless declared
+ -- interface then the generic formal is not unless declared
-- explicitly so. If not declared limited, the actual cannot be
-- limited (see AI05-0087).