[multiple changes]
2017-11-09 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of uninitialized variable uncovered by Codepeer. 2017-11-09 Arnaud Charlet <charlet@adacore.com> * namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap. 2017-11-09 Javier Miranda <miranda@adacore.com> * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: (Static_Dispatch_Tables): Minor rewording. * gnat_rm.texi: Regenerate. 2017-11-09 Justin Squirek <squirek@adacore.com> * sem_ch8.adb (Analyze_Use_Package): Remove forced installation of use_clauses within instances. (Use_One_Package): Add condition to check for "hidden" open scopes to avoid skipping over packages that have not been properly installed even though they are visible. 2017-11-09 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a private operation of a protected type, when the type has no visible operations. From-SVN: r254578
This commit is contained in:
parent
5612989e5b
commit
614bc51c3f
|
@ -1,3 +1,32 @@
|
|||
2017-11-09 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* sem_ch12.adb (Analyze_Subprogram_Instantiation): Correct use of
|
||||
uninitialized variable uncovered by Codepeer.
|
||||
|
||||
2017-11-09 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* namet.adb: Replace pragma Assume by pragma Assert to fix bootstrap.
|
||||
|
||||
2017-11-09 Javier Miranda <miranda@adacore.com>
|
||||
|
||||
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
|
||||
(Static_Dispatch_Tables): Minor rewording.
|
||||
* gnat_rm.texi: Regenerate.
|
||||
|
||||
2017-11-09 Justin Squirek <squirek@adacore.com>
|
||||
|
||||
* sem_ch8.adb (Analyze_Use_Package): Remove forced installation of
|
||||
use_clauses within instances.
|
||||
(Use_One_Package): Add condition to check for "hidden" open scopes to
|
||||
avoid skipping over packages that have not been properly installed even
|
||||
though they are visible.
|
||||
|
||||
2017-11-09 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* sem_ch4.adb (Analyze_Selected_Component): Reject properly a call to a
|
||||
private operation of a protected type, when the type has no visible
|
||||
operations.
|
||||
|
||||
2017-11-09 Javier Miranda <miranda@adacore.com>
|
||||
|
||||
* rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_HT_Link.
|
||||
|
|
|
@ -992,7 +992,7 @@ Static_Dispatch_Tables
|
|||
----------------------
|
||||
.. index:: Static_Dispatch_Tables
|
||||
|
||||
[GNAT] This restriction ensures at compile time that all the artifacts
|
||||
[GNAT] This restriction checks at compile time that all the artifacts
|
||||
associated with dispatch tables can be placed in read-only memory.
|
||||
|
||||
SPARK_05
|
||||
|
|
|
@ -13141,7 +13141,7 @@ type @code{Character}).
|
|||
|
||||
@geindex Static_Dispatch_Tables
|
||||
|
||||
[GNAT] This restriction ensures at compile time that all the artifacts
|
||||
[GNAT] This restriction checks at compile time that all the artifacts
|
||||
associated with dispatch tables can be placed in read-only memory.
|
||||
|
||||
@node SPARK_05,,Static_Dispatch_Tables,Program Unit Level Restrictions
|
||||
|
|
|
@ -261,8 +261,10 @@ package body Namet is
|
|||
declare
|
||||
W2 : constant Word := Hex (2);
|
||||
begin
|
||||
pragma Assume (W2 <= 255);
|
||||
-- Add assumption to facilitate static analysis
|
||||
pragma Assert (W2 <= 255);
|
||||
-- Add assumption to facilitate static analysis. Note
|
||||
-- that we cannot use pragma Assume for bootstrap
|
||||
-- reasons.
|
||||
Insert_Character (Character'Val (W2));
|
||||
end;
|
||||
end if;
|
||||
|
@ -759,7 +761,7 @@ package body Namet is
|
|||
|
||||
Write_Eol;
|
||||
Write_Str ("Average number of probes for lookup = ");
|
||||
pragma Assume (Nsyms /= 0);
|
||||
pragma Assert (Nsyms /= 0);
|
||||
-- Add assumption to facilitate static analysis. Here Nsyms cannot be
|
||||
-- zero because many symbols are added to the table by default.
|
||||
Probes := Probes / Nsyms;
|
||||
|
|
|
@ -5130,6 +5130,7 @@ package body Sem_Ch12 is
|
|||
is
|
||||
Loc : constant Source_Ptr := Sloc (N);
|
||||
Gen_Id : constant Node_Id := Name (N);
|
||||
Errs : constant Nat := Serious_Errors_Detected;
|
||||
|
||||
Anon_Id : constant Entity_Id :=
|
||||
Make_Defining_Identifier (Sloc (Defining_Entity (N)),
|
||||
|
@ -5723,7 +5724,9 @@ package body Sem_Ch12 is
|
|||
end if;
|
||||
|
||||
<<Leave>>
|
||||
if Has_Aspects (N) then
|
||||
-- Analyze aspects in declaration if no errors appear in the instance.
|
||||
|
||||
if Has_Aspects (N) and then Serious_Errors_Detected = Errs then
|
||||
Analyze_Aspect_Specifications (N, Act_Decl_Id);
|
||||
end if;
|
||||
|
||||
|
|
|
@ -5043,10 +5043,13 @@ package body Sem_Ch4 is
|
|||
end if;
|
||||
end if;
|
||||
|
||||
Next_Entity (Comp);
|
||||
-- Do not examine private operations if not within scope of
|
||||
-- the synchronized type.
|
||||
|
||||
exit when not In_Scope
|
||||
and then
|
||||
Comp = First_Private_Entity (Base_Type (Prefix_Type));
|
||||
Next_Entity (Comp);
|
||||
end loop;
|
||||
|
||||
-- If the scope is a current instance, the prefix cannot be an
|
||||
|
|
|
@ -3821,10 +3821,7 @@ package body Sem_Ch8 is
|
|||
Check_In_Previous_With_Clause (N, Name (N));
|
||||
end if;
|
||||
|
||||
-- Force the use_clause when we are in a generic instance because the
|
||||
-- scope of the package has changed and we must ensure visibility.
|
||||
|
||||
Use_One_Package (N, Name (N), Force => In_Instance);
|
||||
Use_One_Package (N, Name (N));
|
||||
|
||||
-- Capture the first Ghost package and the first living package
|
||||
|
||||
|
@ -9443,7 +9440,10 @@ package body Sem_Ch8 is
|
|||
|
||||
-- Warn about detected redundant clauses
|
||||
|
||||
elsif In_Open_Scopes (P) and not Force then
|
||||
elsif not Force
|
||||
and then In_Open_Scopes (P)
|
||||
and then not Is_Hidden_Open_Scope (P)
|
||||
then
|
||||
if Warn_On_Redundant_Constructs and then P = Current_Scope then
|
||||
Error_Msg_NE -- CODEFIX
|
||||
("& is already use-visible within itself?r?",
|
||||
|
|
Loading…
Reference in New Issue