Commit e074d476 by Arnaud Charlet

[multiple changes]

2010-06-14  Robert Dewar  <dewar@adacore.com>

	* a-convec.adb, sem_prag.adb, checks.adb: Minor reformatting

2010-06-14  Eric Botcazou  <ebotcazou@adacore.com>

	* init.c: Code clean up.

2010-06-14  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Address): Do
	not insert address clause in table for later validation if type of
	entity is generic, to prevent possible spurious errors. 

	* sem_ch8.adb: Code clean up.

2010-06-14  Ben Brosgol  <brosgol@adacore.com>

	* gnat_ugn.texi: Expanded @ovar macro inline to solve problem with
	texi2pdf and texi2html.
	Document how to change scheduling properties on HP-UX.

2010-06-14  Thomas Quinot  <quinot@adacore.com>

	* g-socket.ads: Remove misleading comments.

From-SVN: r160711
parent 8255bc9d
2010-06-14 Robert Dewar <dewar@adacore.com>
* a-convec.adb, sem_prag.adb, checks.adb: Minor reformatting
2010-06-14 Eric Botcazou <ebotcazou@adacore.com>
* init.c: Code clean up.
2010-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Address): Do
not insert address clause in table for later validation if type of
entity is generic, to prevent possible spurious errors.
* sem_ch8.adb: Code clean up.
2010-06-14 Ben Brosgol <brosgol@adacore.com>
* gnat_ugn.texi: Expanded @ovar macro inline to solve problem with
texi2pdf and texi2html.
Document how to change scheduling properties on HP-UX.
2010-06-14 Thomas Quinot <quinot@adacore.com>
* g-socket.ads: Remove misleading comments.
2010-06-14 Jerome Lambourg <lambourg@adacore.com> 2010-06-14 Jerome Lambourg <lambourg@adacore.com>
* sem_prag.adb (Check_Duplicated_Export_Name): Remove check for * sem_prag.adb (Check_Duplicated_Export_Name): Remove check for
......
...@@ -103,10 +103,12 @@ package body Ada.Containers.Vectors is ...@@ -103,10 +103,12 @@ package body Ada.Containers.Vectors is
-- end of the range of Int. -- end of the range of Int.
if Index_Type'First <= 0 then if Index_Type'First <= 0 then
-- Compute the potential Last index value in the normal way, using -- Compute the potential Last index value in the normal way, using
-- Int as the type in which to perform intermediate -- Int as the type in which to perform intermediate
-- calculations. Int is a 64-bit type, and Count_Type is a 32-bit -- calculations. Int is a 64-bit type, and Count_Type is a 32-bit
-- type, so no overflow can occur. -- type, so no overflow can occur.
J := Int (Index_Type'First - 1) + N; J := Int (Index_Type'First - 1) + N;
if J > Int (Index_Type'Last) then if J > Int (Index_Type'Last) then
...@@ -120,6 +122,7 @@ package body Ada.Containers.Vectors is ...@@ -120,6 +122,7 @@ package body Ada.Containers.Vectors is
-- greater than Index_Type'Last (as we do above), we work -- greater than Index_Type'Last (as we do above), we work
-- backwards by computing the potential First index value, and -- backwards by computing the potential First index value, and
-- then checking whether that value is less than Index_Type'First. -- then checking whether that value is less than Index_Type'First.
J := Int (Index_Type'Last) - N + 1; J := Int (Index_Type'Last) - N + 1;
if J < Int (Index_Type'First) then if J < Int (Index_Type'First) then
...@@ -129,6 +132,7 @@ package body Ada.Containers.Vectors is ...@@ -129,6 +132,7 @@ package body Ada.Containers.Vectors is
-- We have determined that Length would not create a Last index -- We have determined that Length would not create a Last index
-- value outside of the range of Index_Type, so we can now safely -- value outside of the range of Index_Type, so we can now safely
-- compute its value. -- compute its value.
J := Int (Index_Type'First - 1) + N; J := Int (Index_Type'First - 1) + N;
end if; end if;
......
...@@ -1107,8 +1107,8 @@ package body Checks is ...@@ -1107,8 +1107,8 @@ package body Checks is
or else or else
(Is_Entity_Name (Obj) (Is_Entity_Name (Obj)
and then Present (Renamed_Object (Entity (Obj))) and then Present (Renamed_Object (Entity (Obj)))
and then Nkind (Renamed_Object (Entity (Obj))) and then Nkind (Renamed_Object (Entity (Obj))) =
= N_Explicit_Dereference); N_Explicit_Dereference);
end Denotes_Explicit_Dereference; end Denotes_Explicit_Dereference;
---------------------------------------- ----------------------------------------
......
...@@ -459,8 +459,7 @@ package GNAT.Sockets is ...@@ -459,8 +459,7 @@ package GNAT.Sockets is
type Family_Type is (Family_Inet, Family_Inet6); type Family_Type is (Family_Inet, Family_Inet6);
-- Address family (or protocol family) identifies the communication domain -- Address family (or protocol family) identifies the communication domain
-- and groups protocols with similar address formats. IPv6 will soon be -- and groups protocols with similar address formats.
-- supported.
type Mode_Type is (Socket_Stream, Socket_Datagram); type Mode_Type is (Socket_Stream, Socket_Datagram);
-- Stream sockets provide connection-oriented byte streams. Datagram -- Stream sockets provide connection-oriented byte streams. Datagram
......
...@@ -1026,13 +1026,19 @@ package body Sem_Ch13 is ...@@ -1026,13 +1026,19 @@ package body Sem_Ch13 is
-- check till after code generation to take full advantage -- check till after code generation to take full advantage
-- of the annotation done by the back end. This entry is -- of the annotation done by the back end. This entry is
-- only made if the address clause comes from source. -- only made if the address clause comes from source.
-- If the entity has a generic type, the check will be
-- performed in the instance if the actual type justfies it,
-- and we do not insert the clause in the table to prevent
-- spurious warnings.
if Address_Clause_Overlay_Warnings if Address_Clause_Overlay_Warnings
and then Comes_From_Source (N) and then Comes_From_Source (N)
and then Present (O_Ent) and then Present (O_Ent)
and then Is_Object (O_Ent) and then Is_Object (O_Ent)
then then
Address_Clause_Checks.Append ((N, U_Ent, O_Ent, Off)); if not Is_Generic_Type (Etype (U_Ent)) then
Address_Clause_Checks.Append ((N, U_Ent, O_Ent, Off));
end if;
-- If variable overlays a constant view, and we are -- If variable overlays a constant view, and we are
-- warning on overlays, then mark the variable as -- warning on overlays, then mark the variable as
......
...@@ -7162,11 +7162,11 @@ package body Sem_Ch8 is ...@@ -7162,11 +7162,11 @@ package body Sem_Ch8 is
-- we compare the scope depth of its scope with that of the -- we compare the scope depth of its scope with that of the
-- current instance. However, a generic actual of a subprogram -- current instance. However, a generic actual of a subprogram
-- instance is declared in the wrapper package but will not be -- instance is declared in the wrapper package but will not be
-- hidden by a use-visible entity. Similarly, a generic actual -- hidden by a use-visible entity. similarly, an entity that is
-- will not be hidden by an entity declared in another generic -- declared in an enclosing instance will not be hidden by an
-- actual, which can only have been use-visible in the generic. -- an entity declared in a generic actual, which can only have
-- Is this condition complete, and can the following complex -- been use-visible in the generic and will not have hidden the
-- test be simplified ??? -- entity in the generic parent.
-- If Id is called Standard, the predefined package with the -- If Id is called Standard, the predefined package with the
-- same name is in the homonym chain. It has to be ignored -- same name is in the homonym chain. It has to be ignored
...@@ -7181,8 +7181,8 @@ package body Sem_Ch8 is ...@@ -7181,8 +7181,8 @@ package body Sem_Ch8 is
and then (Scope (Prev) /= Standard_Standard and then (Scope (Prev) /= Standard_Standard
or else Sloc (Prev) > Standard_Location) or else Sloc (Prev) > Standard_Location)
then then
if Ekind (Prev) = E_Package if In_Open_Scopes (Scope (Prev))
and then Present (Associated_Formal_Package (Prev)) and then Is_Generic_Instance (Scope (Prev))
and then Present (Associated_Formal_Package (P)) and then Present (Associated_Formal_Package (P))
then then
null; null;
......
...@@ -2589,7 +2589,7 @@ package body Sem_Prag is ...@@ -2589,7 +2589,7 @@ package body Sem_Prag is
and then Ekind (E) /= E_Variable and then Ekind (E) /= E_Variable
and then not and then not
(Is_Access_Type (E) (Is_Access_Type (E)
and then Ekind (Designated_Type (E)) = E_Subprogram_Type) and then Ekind (Designated_Type (E)) = E_Subprogram_Type)
then then
Error_Pragma_Arg Error_Pragma_Arg
("second argument of pragma% must be subprogram (type)", ("second argument of pragma% must be subprogram (type)",
...@@ -2602,7 +2602,6 @@ package body Sem_Prag is ...@@ -2602,7 +2602,6 @@ package body Sem_Prag is
Set_Convention_From_Pragma (E); Set_Convention_From_Pragma (E);
if Is_Type (E) then if Is_Type (E) then
Check_First_Subtype (Arg2); Check_First_Subtype (Arg2);
Set_Convention_From_Pragma (Base_Type (E)); Set_Convention_From_Pragma (Base_Type (E));
......
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