[multiple changes]

2012-02-17  Thomas Quinot  <quinot@adacore.com>

	* sem_aggr.adb: Minor reformatting.

2012-02-17  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.

2012-02-17  Vincent Pucci  <pucci@adacore.com>

	* sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
	(Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
	call added.
	(Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
	call added.
	* s-dim.ads: Make package Pure.

2012-02-17  Gary Dismukes  <dismukes@adacore.com>

	* prj-nmsc.adb: Minor reformatting.

2012-02-17  Yannick Moy  <moy@adacore.com>

	* gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.

From-SVN: r184338
This commit is contained in:
Arnaud Charlet 2012-02-17 15:07:11 +01:00
parent 0df7e2d0ec
commit 2293611f2d
7 changed files with 1161 additions and 560 deletions

View File

@ -1,3 +1,28 @@
2012-02-17 Thomas Quinot <quinot@adacore.com>
* sem_aggr.adb: Minor reformatting.
2012-02-17 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Update doc for -gnatw.m to include 2*x case.
2012-02-17 Vincent Pucci <pucci@adacore.com>
* sem_dim.adb (Is_Dim_IO_Package_Entity): New routine.
(Is_Dim_IO_Package_Instantiation): Is_Dim_IO_Package_Entity
call added.
(Is_Procedure_Put_Call): Is_Dim_IO_Package_Entity
call added.
* s-dim.ads: Make package Pure.
2012-02-17 Gary Dismukes <dismukes@adacore.com>
* prj-nmsc.adb: Minor reformatting.
2012-02-17 Yannick Moy <moy@adacore.com>
* gnat_rm.texi: Update GNAT RM with a separate chapter on restrictions.
2012-02-17 Yannick Moy <moy@adacore.com>
* gnat_ugn.texi: Fix typos.

File diff suppressed because it is too large Load Diff

View File

@ -5472,7 +5472,9 @@ This switch activates warnings for modulus values that seem suspicious.
The cases caught are where the size is the same as the modulus (e.g.
a modulus of 7 with a size of 7 bits), and modulus values of 32 or 64
with no size clause. The guess in both cases is that 2**x was intended
rather than x. The default is that these warnings are given.
rather than x. In addition expressions of the form 2*x for small x
generate a warning (the almost certainly accurate guess being that
2**x was intended). The default is that these warnings are given.
@item -gnatw.M
@emph{Disable warnings on suspicious modulus values.}

View File

@ -8175,7 +8175,7 @@ package body Prj.Nmsc is
procedure Check_Aggregated
(Project : Project_Id;
Data : in out Tree_Processing_Data);
-- Check aggregated projets which should not be externally built.
-- Check aggregated projects which should not be externally built.
-- What is Data??? if same as outer Data, why passed???
-- What exact check is performed here??? Seems a bad idea to have
-- two procedures with such close names ???

View File

@ -66,4 +66,6 @@
-- 'm' is the symbolic name of dimensioned subtype Length
package System.Dim is
pragma Pure;
end System.Dim;

View File

@ -3920,9 +3920,10 @@ package body Sem_Aggr is
and then Present (Expression (Parent (Component)))
then
Expr :=
New_Copy_Tree (Expression (Parent (Component)),
New_Scope => Current_Scope,
New_Sloc => Sloc (N));
New_Copy_Tree
(Expression (Parent (Component)),
New_Scope => Current_Scope,
New_Sloc => Sloc (N));
Add_Association
(Component => Component,

View File

@ -311,6 +311,10 @@ package body Sem_Dim is
-- Given a dimension vector and a dimension system, return the proper
-- string of symbols.
function Is_Dim_IO_Package_Entity (E : Entity_Id) return Boolean;
-- Return True if E is the package entity of System.Dim.Float_IO or
-- System.Dim.Integer_IO.
function Is_Invalid (Position : Dimension_Position) return Boolean;
-- Return True if Pos denotes the invalid position
@ -2165,7 +2169,6 @@ package body Sem_Dim is
Dims_Of_Actual : Dimension_Type;
Etyp : Entity_Id;
New_Str_Lit : Node_Id := Empty;
Package_Name : Name_Id;
System : System_Type;
function Has_Dimension_Symbols return Boolean;
@ -2240,19 +2243,10 @@ package body Sem_Dim is
then
Ent := Cunit_Entity (Get_Source_Unit (Ent));
-- Verify that the generic package is System.Dim.Float_IO or
-- System.Dim.Integer_IO.
-- Verify that the generic package is either
-- System.Dim.Float_IO or System.Dim.Integer_IO.
if Is_Library_Level_Entity (Ent) then
Package_Name := Chars (Ent);
if Package_Name = Name_Float_IO
or else
Package_Name = Name_Integer_IO
then
return Chars (Scope (Ent)) = Name_Dim;
end if;
end if;
return Is_Dim_IO_Package_Entity (Ent);
end if;
end if;
@ -2501,6 +2495,26 @@ package body Sem_Dim is
return Exists (System_Of (Typ));
end Has_Dimension_System;
------------------------------
-- Is_Dim_IO_Package_Entity --
------------------------------
function Is_Dim_IO_Package_Entity (E : Entity_Id) return Boolean is
begin
-- Check the package entity is standard and its scope is either
-- System.Dim.Float_IO or System.Dim.Integer_IO.
if Is_Library_Level_Entity (E)
and then (Chars (E) = Name_Float_IO
or else Chars (E) = Name_Integer_IO)
then
return Chars (Scope (E)) = Name_Dim
and Chars (Scope (Scope (E))) = Name_System;
end if;
return False;
end Is_Dim_IO_Package_Entity;
-------------------------------------
-- Is_Dim_IO_Package_Instantiation --
-------------------------------------
@ -2513,16 +2527,10 @@ package body Sem_Dim is
if Is_Entity_Name (Gen_Id) then
Ent := Entity (Gen_Id);
-- Is it really OK just to test names ??? why???
-- Verify that the instantiated package is either System.Dim.Float_IO
-- or System.Dim.Integer_IO.
if Is_Library_Level_Entity (Ent)
and then
(Chars (Ent) = Name_Float_IO
or else
Chars (Ent) = Name_Integer_IO)
then
return Chars (Scope (Ent)) = Name_Dim;
end if;
return Is_Dim_IO_Package_Entity (Ent);
end if;
return False;