summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 08:55:51 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 08:55:51 +0000
commit1fc096b1d4730071f76d5ce9367c10bfdd663b5d (patch)
treed3d43f7a558b700ce77e85a82786d8e77509880d /gcc/ada
parent57ecb9696dc295d055c637411d89a5bc4c6790d2 (diff)
downloadgcc-1fc096b1d4730071f76d5ce9367c10bfdd663b5d.tar.gz
2009-04-20 Bob Duff <duff@adacore.com>
* rtsfind.adb: Minor comment fix 2009-04-20 Robert Dewar <dewar@adacore.com> * exp_aggr.adb: Minor reformatting Minor code reorganization (use Nkind_In) * g-socket.adb: Minor reformatting * g-socket.ads: Minor comment fix * s-auxdec.ads: Minor comment and organization update. * s-auxdec-vms_64.ads: Minor comment and organization update. * sem_ch10.adb: Minor addition of ??? comment * sem_disp.adb: Minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146375 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog21
-rw-r--r--gcc/ada/exp_aggr.adb49
-rw-r--r--gcc/ada/g-socket.adb1
-rw-r--r--gcc/ada/g-socket.ads2
-rw-r--r--gcc/ada/rtsfind.adb6
-rw-r--r--gcc/ada/s-auxdec-vms_64.ads12
-rw-r--r--gcc/ada/s-auxdec.ads12
-rw-r--r--gcc/ada/sem_ch10.adb2
-rw-r--r--gcc/ada/sem_disp.adb15
9 files changed, 69 insertions, 51 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 44f54ee4d21..ef790b22cf7 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,24 @@
+2009-04-20 Bob Duff <duff@adacore.com>
+
+ * rtsfind.adb: Minor comment fix
+
+2009-04-20 Robert Dewar <dewar@adacore.com>
+
+ * exp_aggr.adb: Minor reformatting
+ Minor code reorganization (use Nkind_In)
+
+ * g-socket.adb: Minor reformatting
+
+ * g-socket.ads: Minor comment fix
+
+ * s-auxdec.ads: Minor comment and organization update.
+
+ * s-auxdec-vms_64.ads: Minor comment and organization update.
+
+ * sem_ch10.adb: Minor addition of ??? comment
+
+ * sem_disp.adb: Minor reformatting
+
2009-04-20 Ed Schonberg <schonberg@adacore.com>
* inline.adb (Add_Inlined_Subprogram): Do not place on the back-end
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 471a3ae503d..9200165b844 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -1069,16 +1069,14 @@ package body Exp_Aggr is
-- default initialized components (otherwise Expr_Q is not present).
if Present (Expr_Q)
- and then (Nkind (Expr_Q) = N_Aggregate
- or else Nkind (Expr_Q) = N_Extension_Aggregate)
+ and then Nkind_In (Expr_Q, N_Aggregate, N_Extension_Aggregate)
then
- -- At this stage the Expression may not have been
- -- analyzed yet because the array aggregate code has not
- -- been updated to use the Expansion_Delayed flag and
- -- avoid analysis altogether to solve the same problem
- -- (see Resolve_Aggr_Expr). So let us do the analysis of
- -- non-array aggregates now in order to get the value of
- -- Expansion_Delayed flag for the inner aggregate ???
+ -- At this stage the Expression may not have been analyzed yet
+ -- because the array aggregate code has not been updated to use
+ -- the Expansion_Delayed flag and avoid analysis altogether to
+ -- solve the same problem (see Resolve_Aggr_Expr). So let us do
+ -- the analysis of non-array aggregates now in order to get the
+ -- value of Expansion_Delayed flag for the inner aggregate ???
if Present (Comp_Type) and then not Is_Array_Type (Comp_Type) then
Analyze_And_Resolve (Expr_Q, Comp_Type);
@@ -2551,10 +2549,8 @@ package body Exp_Aggr is
-- of one such.
elsif Is_Limited_Type (Etype (A))
- and then (Nkind (Unqualify (A)) = N_Aggregate
- or else
- Nkind (Unqualify (A)) = N_Extension_Aggregate)
- and then Nkind (Unqualify (A)) /= N_Explicit_Dereference
+ and then Nkind_In (Unqualify (A), N_Aggregate,
+ N_Extension_Aggregate)
then
Ancestor_Is_Expression := True;
@@ -2589,8 +2585,8 @@ package body Exp_Aggr is
-- If the ancestor part is an aggregate, force its full
-- expansion, which was delayed.
- if Nkind (Unqualify (A)) = N_Aggregate
- or else Nkind (Unqualify (A)) = N_Extension_Aggregate
+ if Nkind_In (Unqualify (A), N_Aggregate,
+ N_Extension_Aggregate)
then
Set_Analyzed (A, False);
Set_Analyzed (Expression (A), False);
@@ -3495,7 +3491,7 @@ package body Exp_Aggr is
(Is_Inherently_Limited_Type (Typ)
and then
(Nkind (Parent (Parent_Node)) = N_Extended_Return_Statement
- or else Nkind (Parent_Node) = N_Simple_Return_Statement))
+ or else Nkind (Parent_Node) = N_Simple_Return_Statement))
then
Set_Expansion_Delayed (N);
return;
@@ -3691,7 +3687,7 @@ package body Exp_Aggr is
if Nkind (Elmt) = N_Aggregate
and then Present (Next_Index (Ix))
and then
- not Flatten (Elmt, Next_Index (Ix), Next_Index (Ixb))
+ not Flatten (Elmt, Next_Index (Ix), Next_Index (Ixb))
then
return False;
end if;
@@ -5022,8 +5018,8 @@ package body Exp_Aggr is
else
Maybe_In_Place_OK :=
(Nkind (Parent (N)) = N_Assignment_Statement
- and then Comes_From_Source (N)
- and then In_Place_Assign_OK)
+ and then Comes_From_Source (N)
+ and then In_Place_Assign_OK)
or else
(Nkind (Parent (Parent (N))) = N_Allocator
@@ -5389,8 +5385,8 @@ package body Exp_Aggr is
-- an atomic move for it.
if Is_Atomic (Typ)
- and then (Nkind (Parent (N)) = N_Object_Declaration
- or else Nkind (Parent (N)) = N_Assignment_Statement)
+ and then Nkind_In (Parent (N), N_Object_Declaration,
+ N_Assignment_Statement)
and then Comes_From_Source (Parent (N))
then
Expand_Atomic_Aggregate (N, Typ);
@@ -5777,8 +5773,7 @@ package body Exp_Aggr is
C : Node_Id;
Expr : Node_Id;
begin
- pragma Assert (Nkind (N) = N_Aggregate
- or else Nkind (N) = N_Extension_Aggregate);
+ pragma Assert (Nkind_In (N, N_Aggregate, N_Extension_Aggregate));
if No (Comps) then
return False;
@@ -5806,8 +5801,8 @@ package body Exp_Aggr is
Expr := Expression (C);
if Present (Expr)
- and then (Nkind (Expr) = N_Aggregate
- or else Nkind (Expr) = N_Extension_Aggregate)
+ and then
+ Nkind_In (Expr, N_Aggregate, N_Extension_Aggregate)
and then Has_Default_Init_Comps (Expr)
then
return True;
@@ -6423,8 +6418,8 @@ package body Exp_Aggr is
return False;
else
- -- The aggregate is static if all components are literals, or
- -- else all its components are static aggregates for the
+ -- The aggregate is static if all components are literals,
+ -- or else all its components are static aggregates for the
-- component type. We also limit the size of a static aggregate
-- to prevent runaway static expressions.
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index 784d0626bad..5ddbd42f737 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -1690,6 +1690,7 @@ package body GNAT.Sockets is
if EAGAIN /= EWOULDBLOCK and then Error_Value = EAGAIN then
return Resource_Temporarily_Unavailable;
end if;
+
pragma Warnings (On);
case Error_Value is
diff --git a/gcc/ada/g-socket.ads b/gcc/ada/g-socket.ads
index 882a31a8231..8de8f02fe7e 100644
--- a/gcc/ada/g-socket.ads
+++ b/gcc/ada/g-socket.ads
@@ -1083,7 +1083,7 @@ package GNAT.Sockets is
E_Socket_Set : in out Socket_Set_Type;
Status : out Selector_Status;
Timeout : Selector_Duration := Forever);
- -- This refined version of Check_Selector allows to watch for exception
+ -- This refined version of Check_Selector allows watching for exception
-- events (i.e. notifications of out-of-band transmission and reception).
-- As above, all of R_Socket_Set, W_Socket_Set and E_Socket_Set must be
-- different objects.
diff --git a/gcc/ada/rtsfind.adb b/gcc/ada/rtsfind.adb
index 9944bbf713b..fbe6d4547ef 100644
--- a/gcc/ada/rtsfind.adb
+++ b/gcc/ada/rtsfind.adb
@@ -720,9 +720,9 @@ package body Rtsfind is
-- If the RTS Unit *does* depend on the current unit, for instance,
-- when you are compiling System, then you had better have finished
- -- analyzing the part of System that is depended on before you try
- -- to load the RTS Unit. This means having the System ordered in an
- -- appropriate manner.
+ -- analyzing the part of System that is depended on before you try to
+ -- load the RTS Unit. This means having the code in System ordered in
+ -- an appropriate manner.
Set_Analyzed (Cunit (Current_Sem_Unit), True);
diff --git a/gcc/ada/s-auxdec-vms_64.ads b/gcc/ada/s-auxdec-vms_64.ads
index b36341c0163..3213e18a642 100644
--- a/gcc/ada/s-auxdec-vms_64.ads
+++ b/gcc/ada/s-auxdec-vms_64.ads
@@ -63,22 +63,22 @@ package System.Aux_DEC is
type Integer_8 is range -2 ** (8 - 1) .. +2 ** (8 - 1) - 1;
for Integer_8'Size use 8;
- type Integer_8_Array is array (Integer range <>) of Integer_8;
-
type Integer_16 is range -2 ** (16 - 1) .. +2 ** (16 - 1) - 1;
for Integer_16'Size use 16;
- type Integer_16_Array is array (Integer range <>) of Integer_16;
-
type Integer_32 is range -2 ** (32 - 1) .. +2 ** (32 - 1) - 1;
for Integer_32'Size use 32;
- type Integer_32_Array is array (Integer range <>) of Integer_32;
-
type Integer_64 is range -2 ** (64 - 1) .. +2 ** (64 - 1) - 1;
for Integer_64'Size use 64;
+ type Integer_8_Array is array (Integer range <>) of Integer_8;
+ type Integer_16_Array is array (Integer range <>) of Integer_16;
+ type Integer_32_Array is array (Integer range <>) of Integer_32;
type Integer_64_Array is array (Integer range <>) of Integer_64;
+ -- These array types are not in all versions of DEC System, and in fact it
+ -- is not quite clear why they are in some and not others, but since they
+ -- definitely appear in some versions, we include them unconditionally.
type Largest_Integer is range Min_Int .. Max_Int;
diff --git a/gcc/ada/s-auxdec.ads b/gcc/ada/s-auxdec.ads
index 3748beec231..4b56bafffc4 100644
--- a/gcc/ada/s-auxdec.ads
+++ b/gcc/ada/s-auxdec.ads
@@ -53,22 +53,22 @@ package System.Aux_DEC is
type Integer_8 is range -2 ** (8 - 1) .. +2 ** (8 - 1) - 1;
for Integer_8'Size use 8;
- type Integer_8_Array is array (Integer range <>) of Integer_8;
-
type Integer_16 is range -2 ** (16 - 1) .. +2 ** (16 - 1) - 1;
for Integer_16'Size use 16;
- type Integer_16_Array is array (Integer range <>) of Integer_16;
-
type Integer_32 is range -2 ** (32 - 1) .. +2 ** (32 - 1) - 1;
for Integer_32'Size use 32;
- type Integer_32_Array is array (Integer range <>) of Integer_32;
-
type Integer_64 is range -2 ** (64 - 1) .. +2 ** (64 - 1) - 1;
for Integer_64'Size use 64;
+ type Integer_8_Array is array (Integer range <>) of Integer_8;
+ type Integer_16_Array is array (Integer range <>) of Integer_16;
+ type Integer_32_Array is array (Integer range <>) of Integer_32;
type Integer_64_Array is array (Integer range <>) of Integer_64;
+ -- These array types are not in all versions of DEC System, and in fact it
+ -- is not quite clear why they are in some and not others, but since they
+ -- definitely appear in some versions, we include them unconditionally.
type Largest_Integer is range Min_Int .. Max_Int;
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index b72c1d291cb..17f907492ee 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -774,6 +774,8 @@ package body Sem_Ch10 is
Version_Update (N, Lib_Unit);
end if;
+ -- Comment needed here ???
+
if Nkind (Defining_Unit_Name (Specification (Unit_Node))) =
N_Defining_Program_Unit_Name
then
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index d6799bce4f5..44ec9c33253 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -739,8 +739,8 @@ package body Sem_Disp is
then
pragma Assert
((Ekind (Subp) = E_Function
- and then Is_Dispatching_Operation (Old_Subp)
- and then Is_Null_Extension (Base_Type (Etype (Subp))))
+ and then Is_Dispatching_Operation (Old_Subp)
+ and then Is_Null_Extension (Base_Type (Etype (Subp))))
or else Get_TSS_Name (Subp) = TSS_Stream_Read
or else Get_TSS_Name (Subp) = TSS_Stream_Write);
@@ -769,12 +769,11 @@ package body Sem_Disp is
null;
-- If the type is already frozen, the overriding is not allowed
- -- except when Old_Subp is not a dispatching operation (which
- -- can occur when Old_Subp was inherited by an untagged type).
- -- However, a body with no previous spec freezes the type "after"
- -- its declaration, and therefore is a legal overriding (unless
- -- the type has already been frozen). Only the first such body
- -- is legal.
+ -- except when Old_Subp is not a dispatching operation (which can
+ -- occur when Old_Subp was inherited by an untagged type). However,
+ -- a body with no previous spec freezes the type "after" its
+ -- declaration, and therefore is a legal overriding (unless the type
+ -- has already been frozen). Only the first such body is legal.
elsif Present (Old_Subp)
and then Is_Dispatching_Operation (Old_Subp)