Commit 1a83142e by Robert Dewar Committed by Arnaud Charlet

sem_prag.adb, [...]: Minor reformatting.

2013-04-22  Robert Dewar  <dewar@adacore.com>

	* sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
	sem_ch6.adb, opt.ads: Minor reformatting.

From-SVN: r198132
parent 1de0ffec
2013-04-22 Robert Dewar <dewar@adacore.com>
* sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb,
sem_ch6.adb, opt.ads: Minor reformatting.
2013-04-22 Pascal Obry <obry@adacore.com>
* gnat_ugn.texi, prj-nmsc.adb, projects.texi: Add check for
......
......@@ -1715,11 +1715,11 @@ package body Exp_Ch6 is
and then Is_Inherited_Operation_For_Type (Subp, E_Actual)
then
Append_To
(Post_Call, Make_Predicate_Check (E_Actual, Actual));
(Post_Call, Make_Predicate_Check (E_Actual, Actual));
elsif Is_Entity_Name (Actual) then
Append_To
(Post_Call, Make_Predicate_Check (E_Actual, Actual));
(Post_Call, Make_Predicate_Check (E_Actual, Actual));
end if;
end if;
......
......@@ -206,7 +206,10 @@ package Opt is
Assertions_Enabled : Boolean := False;
-- GNAT
-- Enable assertions made using pragma Assert
-- Indicates default policy (True = Check, False = Ignore) to be applied
-- to all assertion aspects and pragmas, and to pragma Debug, if there is
-- no overriding Assertion_Policy, Check_Policy, or Debug_Policy pragma.
-- Set True by use of -gnata.
Assume_No_Invalid_Values : Boolean := False;
-- GNAT Normally, in accordance with (RM 13.9.1 (9-11)) the front end
......@@ -282,13 +285,13 @@ package Opt is
Check_Object_Consistency : Boolean := False;
-- GNATBIND, GNATMAKE
-- Set to True to check whether every object file is consistent with
-- its corresponding ada library information (ALI) file. An object
-- file is inconsistent with the corresponding ALI file if the object
-- file does not exist or if it has an older time stamp than the ALI file.
-- Default above is for GNATBIND. GNATMAKE overrides this default to
-- True (see Make.Initialize) since we normally do need to check source
-- consistencies in gnatmake.
-- Set to True to check whether every object file is consistent with its
-- corresponding ada library information (ALI) file. An object file is
-- inconsistent with the corresponding ALI file if the object file does
-- not exist or if it has an older time stamp than the ALI file. Default
-- above is for GNATBIND. GNATMAKE overrides this default to True (see
-- Make.Initialize) since we normally do need to check source consistencies
-- in gnatmake.
Check_Only : Boolean := False;
-- GNATBIND
......
......@@ -7063,17 +7063,15 @@ package body Sem_Ch6 is
-- Last non-trivial contract-cases on the subprogram, or else Empty
Attribute_Result_Mentioned : Boolean := False;
-- Whether attribute 'Result is mentioned in a non-trivial postcondition
-- or contract-cases.
-- True if 'Result used in a non-trivial postcondition or contract-cases
No_Warning_On_Some_Postcondition : Boolean := False;
-- Whether there exists a non-trivial postcondition or contract-cases
-- True if there is a non-trivial postcondition or contract-cases
-- without a corresponding warning.
Post_State_Mentioned : Boolean := False;
-- Whether some expression mentioned in a postcondition or
-- contract-cases can have a different value in the post-state than
-- in the pre-state.
-- True if expression mentioned in a postcondition or contract-cases
-- can have a different value in the post-state than in the pre-state.
function Check_Attr_Result (N : Node_Id) return Traverse_Result;
-- Check if N is a reference to the attribute 'Result, and if so set
......@@ -7223,7 +7221,6 @@ package body Sem_Ch6 is
-- or "False".
if not Is_Trivial_Post_Or_Ensures (Conseq) then
Last_Contract_Cases := Prag;
-- For functions, look for presence of 'Result in
......@@ -12272,8 +12269,7 @@ package body Sem_Ch6 is
end if;
if not Expander_Active then
Prepend
(Grab_PPC (Pspec), Declarations (N));
Prepend (Grab_PPC (Pspec), Declarations (N));
else
Append (Grab_PPC (Pspec), Plist);
end if;
......
......@@ -5899,8 +5899,7 @@ package body Sem_Res is
if Nkind (N) = N_Function_Call
and then Is_Tagged_Type (Etype (N))
and then Is_Entity_Name (Name (N))
and then Is_Inherited_Operation_For_Type
(Entity (Name (N)), Etype (N))
and then Is_Inherited_Operation_For_Type (Entity (Name (N)), Etype (N))
then
Check_SPARK_Restriction ("function not inherited", N);
end if;
......
......@@ -8462,8 +8462,7 @@ package body Sem_Util is
Typ : Entity_Id) return Boolean
is
begin
-- Check that the operation has been created by the declaration for
-- the type.
-- Check that the operation has been created by the type declaration
return Is_Inherited_Operation (E)
and then Defining_Identifier (Parent (E)) = Typ;
......
......@@ -576,6 +576,7 @@ package Sem_Util is
function Get_Ensures_From_CTC_Pragma (N : Node_Id) return Node_Id;
-- Return the Ensures component of Test_Case pragma N, or Empty otherwise
-- Bad name now that this no longer applies to Contract_Case ???
function Get_Generic_Entity (N : Node_Id) return Entity_Id;
-- Returns the true generic entity in an instantiation. If the name in the
......@@ -616,6 +617,7 @@ package Sem_Util is
function Get_Name_From_CTC_Pragma (N : Node_Id) return String_Id;
-- Return the Name component of Test_Case pragma N
-- Bad name now that this no longer applies to Contract_Case ???
function Get_Pragma_Id (N : Node_Id) return Pragma_Id;
pragma Inline (Get_Pragma_Id);
......@@ -634,6 +636,7 @@ package Sem_Util is
function Get_Requires_From_CTC_Pragma (N : Node_Id) return Node_Id;
-- Return the Requires component of Test_Case pragma N, or Empty otherwise
-- Bad name now that this no longer applies to Contract_Case ???
function Get_Subprogram_Entity (Nod : Node_Id) return Entity_Id;
-- Nod is either a procedure call statement, or a function call, or an
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment