Commit 2293611f by Arnaud Charlet

[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
parent 0df7e2d0
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> 2012-02-17 Yannick Moy <moy@adacore.com>
* gnat_ugn.texi: Fix typos. * gnat_ugn.texi: Fix typos.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -5472,7 +5472,9 @@ This switch activates warnings for modulus values that seem suspicious. ...@@ -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. 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 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 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 @item -gnatw.M
@emph{Disable warnings on suspicious modulus values.} @emph{Disable warnings on suspicious modulus values.}
......
...@@ -8175,7 +8175,7 @@ package body Prj.Nmsc is ...@@ -8175,7 +8175,7 @@ package body Prj.Nmsc is
procedure Check_Aggregated procedure Check_Aggregated
(Project : Project_Id; (Project : Project_Id;
Data : in out Tree_Processing_Data); 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 is Data??? if same as outer Data, why passed???
-- What exact check is performed here??? Seems a bad idea to have -- What exact check is performed here??? Seems a bad idea to have
-- two procedures with such close names ??? -- two procedures with such close names ???
......
...@@ -66,4 +66,6 @@ ...@@ -66,4 +66,6 @@
-- 'm' is the symbolic name of dimensioned subtype Length -- 'm' is the symbolic name of dimensioned subtype Length
package System.Dim is package System.Dim is
pragma Pure;
end System.Dim; end System.Dim;
...@@ -3920,9 +3920,10 @@ package body Sem_Aggr is ...@@ -3920,9 +3920,10 @@ package body Sem_Aggr is
and then Present (Expression (Parent (Component))) and then Present (Expression (Parent (Component)))
then then
Expr := Expr :=
New_Copy_Tree (Expression (Parent (Component)), New_Copy_Tree
New_Scope => Current_Scope, (Expression (Parent (Component)),
New_Sloc => Sloc (N)); New_Scope => Current_Scope,
New_Sloc => Sloc (N));
Add_Association Add_Association
(Component => Component, (Component => Component,
......
...@@ -311,6 +311,10 @@ package body Sem_Dim is ...@@ -311,6 +311,10 @@ package body Sem_Dim is
-- Given a dimension vector and a dimension system, return the proper -- Given a dimension vector and a dimension system, return the proper
-- string of symbols. -- 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; function Is_Invalid (Position : Dimension_Position) return Boolean;
-- Return True if Pos denotes the invalid position -- Return True if Pos denotes the invalid position
...@@ -2165,7 +2169,6 @@ package body Sem_Dim is ...@@ -2165,7 +2169,6 @@ package body Sem_Dim is
Dims_Of_Actual : Dimension_Type; Dims_Of_Actual : Dimension_Type;
Etyp : Entity_Id; Etyp : Entity_Id;
New_Str_Lit : Node_Id := Empty; New_Str_Lit : Node_Id := Empty;
Package_Name : Name_Id;
System : System_Type; System : System_Type;
function Has_Dimension_Symbols return Boolean; function Has_Dimension_Symbols return Boolean;
...@@ -2240,19 +2243,10 @@ package body Sem_Dim is ...@@ -2240,19 +2243,10 @@ package body Sem_Dim is
then then
Ent := Cunit_Entity (Get_Source_Unit (Ent)); Ent := Cunit_Entity (Get_Source_Unit (Ent));
-- Verify that the generic package is System.Dim.Float_IO or -- Verify that the generic package is either
-- System.Dim.Integer_IO. -- 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 return Is_Dim_IO_Package_Entity (Ent);
or else
Package_Name = Name_Integer_IO
then
return Chars (Scope (Ent)) = Name_Dim;
end if;
end if;
end if; end if;
end if; end if;
...@@ -2501,6 +2495,26 @@ package body Sem_Dim is ...@@ -2501,6 +2495,26 @@ package body Sem_Dim is
return Exists (System_Of (Typ)); return Exists (System_Of (Typ));
end Has_Dimension_System; 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 -- -- Is_Dim_IO_Package_Instantiation --
------------------------------------- -------------------------------------
...@@ -2513,16 +2527,10 @@ package body Sem_Dim is ...@@ -2513,16 +2527,10 @@ package body Sem_Dim is
if Is_Entity_Name (Gen_Id) then if Is_Entity_Name (Gen_Id) then
Ent := Entity (Gen_Id); 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) return Is_Dim_IO_Package_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;
end if; end if;
return False; return False;
......
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