Commit 455f3336 by Arnaud Charlet

[multiple changes]

2013-10-17  Vincent Celier  <celier@adacore.com>

	* gnat_ugn.texi: Add examples of switches -gnateD, including
	one where the value is a string.
	* projects.texi: Do not convert switches in project files to
	VMS qualifiers.

2013-10-17  Robert Dewar  <dewar@adacore.com>

	* sem_prag.adb (Report_Extra_Clauses): Don't complain about
	refinements with null input since null should be considered to
	always match.

From-SVN: r203749
parent 98779361
2013-10-17 Vincent Celier <celier@adacore.com>
* gnat_ugn.texi: Add examples of switches -gnateD, including
one where the value is a string.
* projects.texi: Do not convert switches in project files to
VMS qualifiers.
2013-10-17 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Report_Extra_Clauses): Don't complain about
refinements with null input since null should be considered to
always match.
2013-10-17 Robert Dewar <dewar@adacore.com> 2013-10-17 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Document -gnatw.y/-gnatw.Y. * gnat_ugn.texi: Document -gnatw.y/-gnatw.Y.
......
...@@ -7724,11 +7724,23 @@ Examples of valid lines in a preprocessor data file: ...@@ -7724,11 +7724,23 @@ Examples of valid lines in a preprocessor data file:
Define or redefine a preprocessing symbol, associated with value. If no value Define or redefine a preprocessing symbol, associated with value. If no value
is given on the command line, then the value of the symbol is @code{True}. is given on the command line, then the value of the symbol is @code{True}.
A symbol is an identifier, following normal Ada (case-insensitive) A symbol is an identifier, following normal Ada (case-insensitive)
rules for its syntax, and value is any sequence (including an empty sequence) rules for its syntax, and value is either an arbitrary string between double
of characters from the set (letters, digits, period, underline). quotes or any sequence (including an empty sequence) of characters from the
set (letters, digits, period, underline).
Ada reserved words may be used as symbols, with the exceptions of @code{if}, Ada reserved words may be used as symbols, with the exceptions of @code{if},
@code{else}, @code{elsif}, @code{end}, @code{and}, @code{or} and @code{then}. @code{else}, @code{elsif}, @code{end}, @code{and}, @code{or} and @code{then}.
@ifclear vms
@noindent
Examples:
@smallexample
-gnateDToto=Titi
-gnateDFoo
-gnateDFoo=\"Foo-Bar\"
@end smallexample
@end ifclear
@noindent @noindent
A symbol declared with this ^switch^switch^ on the command line replaces a A symbol declared with this ^switch^switch^ on the command line replaces a
symbol with the same name either in a definition file or specified with a symbol with the same name either in a definition file or specified with a
...@@ -20031,6 +20031,8 @@ package body Sem_Prag is ...@@ -20031,6 +20031,8 @@ package body Sem_Prag is
elsif Has_Non_Null_Refinement (Dep_Id) then elsif Has_Non_Null_Refinement (Dep_Id) then
Has_Refined_State := True; Has_Refined_State := True;
-- Ref_Input is an entity name
if Is_Entity_Name (Ref_Input) then if Is_Entity_Name (Ref_Input) then
Ref_Id := Entity_Of (Ref_Input); Ref_Id := Entity_Of (Ref_Input);
...@@ -20422,8 +20424,7 @@ package body Sem_Prag is ...@@ -20422,8 +20424,7 @@ package body Sem_Prag is
end if; end if;
end if; end if;
-- Formal parameters and variables match when their inputs -- Formal parameters and variables match if their inputs match
-- match.
elsif Is_Entity_Name (Ref_Output) elsif Is_Entity_Name (Ref_Output)
and then Entity_Of (Ref_Output) = Dep_Id and then Entity_Of (Ref_Output) = Dep_Id
...@@ -20506,9 +20507,17 @@ package body Sem_Prag is ...@@ -20506,9 +20507,17 @@ package body Sem_Prag is
if Present (Refinements) then if Present (Refinements) then
Clause := First (Refinements); Clause := First (Refinements);
while Present (Clause) loop while Present (Clause) loop
Error_Msg_N
("unmatched or extra clause in dependence refinement", -- Do not complain about a null input refinement, since a null
Clause); -- input legitimately matches anything.
if Nkind (Clause) /= N_Component_Association
or else Nkind (Expression (Clause)) /= N_Null
then
Error_Msg_N
("unmatched or extra clause in dependence refinement",
Clause);
end if;
Next (Clause); Next (Clause);
end loop; end loop;
...@@ -20596,7 +20605,7 @@ package body Sem_Prag is ...@@ -20596,7 +20605,7 @@ package body Sem_Prag is
if Nkind (Refs) = N_Null then if Nkind (Refs) = N_Null then
Refinements := No_List; Refinements := No_List;
-- Multiple dependeny clauses appear as component associations of an -- Multiple dependency clauses appear as component associations of an
-- aggregate. Note that the clauses are copied because the algorithm -- aggregate. Note that the clauses are copied because the algorithm
-- modifies them and this should not be visible in Refined_Depends. -- modifies them and this should not be visible in Refined_Depends.
...@@ -20604,11 +20613,11 @@ package body Sem_Prag is ...@@ -20604,11 +20613,11 @@ package body Sem_Prag is
Refinements := New_Copy_List (Component_Associations (Refs)); Refinements := New_Copy_List (Component_Associations (Refs));
end if; end if;
-- Inspect all the clauses of pragma Depends trying to find a -- Inspect all the clauses of pragma Depends looking for a matching
-- matching clause in pragma Refined_Depends. The approach is to use -- clause in pragma Refined_Depends. The approach is to use the
-- the sole output of a clause as a key. Output items are unique in a -- sole output of a clause as a key. Output items are unique in a
-- dependence relation. Clause normalization also ensured that all -- dependence relation. Clause normalization also ensured that all
-- clauses have exactly on output. Depending on what the key is, one -- clauses have exactly one output. Depending on what the key is, one
-- or more refinement clauses may satisfy the dependency clause. Each -- or more refinement clauses may satisfy the dependency clause. Each
-- time a dependency clause is matched, its related refinement clause -- time a dependency clause is matched, its related refinement clause
-- is consumed. In the end, two things may happen: -- is consumed. In the end, two things may happen:
...@@ -20622,7 +20631,6 @@ package body Sem_Prag is ...@@ -20622,7 +20631,6 @@ package body Sem_Prag is
Clause := First (Dependencies); Clause := First (Dependencies);
while Present (Clause) loop while Present (Clause) loop
Check_Dependency_Clause (Clause); Check_Dependency_Clause (Clause);
Next (Clause); Next (Clause);
end loop; end loop;
end if; end if;
...@@ -21583,7 +21591,6 @@ package body Sem_Prag is ...@@ -21583,7 +21591,6 @@ package body Sem_Prag is
if Node (State_Elmt) = State_Id then if Node (State_Elmt) = State_Id then
Add_Item (State_Id, Refined_States_Seen); Add_Item (State_Id, Refined_States_Seen);
Remove_Elmt (Abstr_States, State_Elmt); Remove_Elmt (Abstr_States, State_Elmt);
return; return;
end if; end if;
......
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