+2009-04-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch8.adb (Use_One_Package): In an instance, if two
+ potentially_use_visible and non-overloadable homonyms are available
+ from the actuals of distinct formal packages, retain the current one,
+ which was visible in the generic, to prevent spurious visibility
+ errors.
+ (End_Use_Package): Restore use_visibility when needed.
+
+2009-04-20 Sergey Rybin <rybin@adacore.com>
+
+ * gnat_ugn.texi, vms_data.ads: Update doc.
+
2009-04-20 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Make-lang.in: Update dependencies
@noindent
The @command{gnatcheck} tool outputs on @file{stdout} all messages concerning
rule violations.
-It also creates, in the current
-directory, a text file named @file{^gnatcheck.out^GNATCHECK.OUT^} that
-contains the complete report of the last gnatcheck run. This report contains:
+It also creates a text file that
+contains the complete report of the last gnatcheck run. By default this file is
+named named @file{^gnatcheck.out^GNATCHECK.OUT^} and it is located in the current
+directory, @option{^-o^/OUTPUT^} option can be used to change the name and/or
+location of the report file. This report contains:
@itemize @bullet
@item a list of the Ada source files being checked,
@item a list of enabled and disabled rules,
Verbose mode; @command{gnatcheck} generates version information and then
a trace of sources being processed.
+
+@cindex @option{^-o ^/OUTPUT^} (@command{gnatcheck})
+@item ^-o ^/OUTPUT=^@var{report_file}
+Set name of report file file to @var{report_file} .
+
@end table
@noindent
if Present (Hidden_By_Use_Clause (N)) then
Elmt := First_Elmt (Hidden_By_Use_Clause (N));
while Present (Elmt) loop
- Set_Is_Immediately_Visible (Node (Elmt));
- Next_Elmt (Elmt);
+ declare
+ E : constant Entity_Id := Node (Elmt);
+
+ begin
+ -- Reset either Use_Visibility or Direct_Visibility, depending
+ -- on how the entity was hidden by the use clause.
+
+ if In_Use (Scope (E))
+ and then Used_As_Generic_Actual (Scope (E))
+ then
+ Set_Is_Potentially_Use_Visible (Node (Elmt));
+ else
+ Set_Is_Immediately_Visible (Node (Elmt));
+ end if;
+
+ Next_Elmt (Elmt);
+ end;
end loop;
Set_Hidden_By_Use_Clause (N, No_Elist);
or else Chars (Prev) = Name_Op_Expon)
then
goto Next_Usable_Entity;
+
+ -- In an instance, two homonyms may become use_visible through the
+ -- actuals of distinct formal packages. In the generic, only the
+ -- current one would have been visible, so make the other one
+ -- not use_visible.
+
+ elsif Present (Current_Instance)
+ and then Is_Potentially_Use_Visible (Prev)
+ and then not Is_Overloadable (Prev)
+ and then Scope (Id) /= Scope (Prev)
+ and then Used_As_Generic_Actual (Scope (Prev))
+ and then Used_As_Generic_Actual (Scope (Id))
+ and then List_Containing (Current_Use_Clause (Scope (Prev))) /=
+ List_Containing (Current_Use_Clause (Scope (Id)))
+ then
+ Set_Is_Potentially_Use_Visible (Prev, False);
+ Append_Elmt (Prev, Hidden_By_Use_Clause (N));
end if;
Prev := Homonym (Prev);
-- --
-- S p e c --
-- --
--- Copyright (C) 1996-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- copies of the gnat1 commands spawned to obtain the chop control
-- information.
+ S_Check_Out : aliased constant S := "/OUTPUT=@" &
+ "-o@";
+ -- /OUTPUT=filename
+ --
+ -- Specify the name of the output file.
+
Check_Switches : aliased constant Switches :=
(S_Check_Add 'Access,
S_Check_All 'Access,
S_Check_Sections 'Access,
S_Check_Short 'Access,
S_Check_Subdirs 'Access,
- S_Check_Verb 'Access);
+ S_Check_Verb 'Access,
+ S_Check_Out 'Access);
----------------------------
-- Switches for GNAT CHOP --