summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-07 14:53:39 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-07 14:53:39 +0000
commit736925387f41359c260af6de601b6bfd5118c083 (patch)
tree800812e8ad55fa893c772c327112a7dd5d669ba7
parent3ae6bcd54d8f650874b3309d0f04dcf20632b612 (diff)
downloadgcc-736925387f41359c260af6de601b6bfd5118c083.tar.gz
2012-03-07 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb, s-gearop.adb, sem_ch6.adb, s-bbthre.adb, g-trasym.adb: Minor reformatting. 2012-03-07 Javier Miranda <miranda@adacore.com> * a-ngrear.ads: Add documentation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185053 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/a-ngrear.ads6
-rw-r--r--gcc/ada/exp_ch6.adb4
-rw-r--r--gcc/ada/g-trasym.adb1
-rw-r--r--gcc/ada/s-gearop.adb40
-rw-r--r--gcc/ada/s-taprop-vms.adb4
-rw-r--r--gcc/ada/s-vaflop.adb16
-rw-r--r--gcc/ada/sem_ch5.adb7
-rw-r--r--gcc/ada/sem_ch6.adb2
9 files changed, 55 insertions, 34 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 1403e2874d7..645f9d59bf2 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2012-03-07 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb,
+ s-gearop.adb, sem_ch6.adb, g-trasym.adb: Minor reformatting.
+
+2012-03-07 Javier Miranda <miranda@adacore.com>
+
+ * a-ngrear.ads: Add documentation.
+
2012-03-07 Tristan Gingold <gingold@adacore.com>
* s-taprop-vms.adb (Create_Task): set thread name.
diff --git a/gcc/ada/a-ngrear.ads b/gcc/ada/a-ngrear.ads
index f8499969a0a..2f38b9051eb 100644
--- a/gcc/ada/a-ngrear.ads
+++ b/gcc/ada/a-ngrear.ads
@@ -122,11 +122,11 @@ private
-- The following operations are either relatively simple compared to the
-- expense of returning unconstrained arrays, or are just function wrappers
-- calling procedures implementing the actual operation. By having the
- -- front end always inline these, the expense of the unconstrained returns
+ -- front end inline these, the expense of the unconstrained returns
-- can be avoided.
- -- Confusing comment above, why does the front end always inline
- -- these functions ???
+ -- Note: We use an extended return statement in their implementation to
+ -- allow the frontend to inline these functions.
pragma Inline ("+");
pragma Inline ("-");
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 1299b15b0d2..2b86d14b005 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -4251,8 +4251,8 @@ package body Exp_Ch6 is
return;
-- Skip inlining if the function returns an unconstrained type using
- -- an extended return statement since this part of the new model of
- -- inlining which is not yet supported by the current implementation.
+ -- an extended return statement since this part of the new inlining
+ -- model which is not yet supported by the current implementation. ???
elsif Is_Unc
and then
diff --git a/gcc/ada/g-trasym.adb b/gcc/ada/g-trasym.adb
index 2957ae087f0..a825f80b704 100644
--- a/gcc/ada/g-trasym.adb
+++ b/gcc/ada/g-trasym.adb
@@ -46,6 +46,7 @@ package body GNAT.Traceback.Symbolic is
begin
if Traceback'Length = 0 then
return "";
+
else
declare
Img : String := System.Address_Image (Traceback (Traceback'First));
diff --git a/gcc/ada/s-gearop.adb b/gcc/ada/s-gearop.adb
index 3d9e4bffdd4..e1ce7e5d517 100644
--- a/gcc/ada/s-gearop.adb
+++ b/gcc/ada/s-gearop.adb
@@ -33,17 +33,15 @@ with Ada.Numerics; use Ada.Numerics;
package body System.Generic_Array_Operations is
- -- The local function Check_Unit_Last computes the index of the last
- -- element returned by Unit_Vector or Unit_Matrix. A separate function is
- -- needed to allow raising Constraint_Error before declaring the function
- -- result variable. The result variable needs to be declared first, to
- -- allow front-end inlining.
-
function Check_Unit_Last
(Index : Integer;
Order : Positive;
First : Integer) return Integer;
pragma Inline_Always (Check_Unit_Last);
+ -- Compute index of last element returned by Unit_Vector or Unit_Matrix.
+ -- A separate function is needed to allow raising Constraint_Error before
+ -- declaring the function result variable. The result variable needs to be
+ -- declared first, to allow front-end inlining.
--------------
-- Diagonal --
@@ -67,9 +65,9 @@ package body System.Generic_Array_Operations is
begin
if A'Length (1) /= A'Length (2) then
raise Constraint_Error with "matrix is not square";
+ else
+ return A'Length (1);
end if;
-
- return A'Length (1);
end Square_Matrix_Length;
---------------------
@@ -111,6 +109,10 @@ package body System.Generic_Array_Operations is
-- Elementary row operation that subtracts Factor * M (Source, <>) from
-- M (Target, <>)
+ -------------
+ -- Sub_Row --
+ -------------
+
procedure Sub_Row
(M : in out Matrix;
Target : Integer;
@@ -255,6 +257,10 @@ package body System.Generic_Array_Operations is
procedure Swap (X, Y : in out Scalar);
-- Exchange the values of X and Y
+ ----------
+ -- Swap --
+ ----------
+
procedure Swap (X, Y : in out Scalar) is
T : constant Scalar := X;
begin
@@ -418,8 +424,8 @@ package body System.Generic_Array_Operations is
begin
return R : Result_Matrix (Left'Range (1), Left'Range (2)) do
if Left'Length (1) /= Right'Length (1)
- or else
- Left'Length (2) /= Right'Length (2)
+ or else
+ Left'Length (2) /= Right'Length (2)
then
raise Constraint_Error with
"matrices are of different dimension in elementwise operation";
@@ -443,14 +449,15 @@ package body System.Generic_Array_Operations is
------------------------------------------------
function Matrix_Matrix_Scalar_Elementwise_Operation
- (X : X_Matrix;
- Y : Y_Matrix;
- Z : Z_Scalar) return Result_Matrix is
+ (X : X_Matrix;
+ Y : Y_Matrix;
+ Z : Z_Scalar) return Result_Matrix
+ is
begin
return R : Result_Matrix (X'Range (1), X'Range (2)) do
if X'Length (1) /= Y'Length (1)
- or else
- X'Length (2) /= Y'Length (2)
+ or else
+ X'Length (2) /= Y'Length (2)
then
raise Constraint_Error with
"matrices are of different dimension in elementwise operation";
@@ -817,7 +824,8 @@ package body System.Generic_Array_Operations is
procedure Update_Matrix_With_Matrix (X : in out X_Matrix; Y : Y_Matrix) is
begin
if X'Length (1) /= Y'Length (1)
- or else X'Length (2) /= Y'Length (2)
+ or else
+ X'Length (2) /= Y'Length (2)
then
raise Constraint_Error with
"matrices are of different dimension in update operation";
diff --git a/gcc/ada/s-taprop-vms.adb b/gcc/ada/s-taprop-vms.adb
index 3c500c5ccd7..046aa037b6d 100644
--- a/gcc/ada/s-taprop-vms.adb
+++ b/gcc/ada/s-taprop-vms.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -781,6 +781,7 @@ package body System.Task_Primitives.Operations is
Ada.Unchecked_Conversion (System.Aux_DEC.Short_Address, Thread_Body);
Task_Name : String (1 .. System.Parameters.Max_Task_Image_Length + 1);
+
begin
-- Since the initial signal mask of a thread is inherited from the
-- creator, we need to set our local signal mask to mask all signals
@@ -811,6 +812,7 @@ package body System.Task_Primitives.Operations is
pragma Assert (Result = 0);
if T.Common.Task_Image_Len > 0 then
+
-- Set thread name to ease debugging
Task_Name (1 .. T.Common.Task_Image_Len) :=
diff --git a/gcc/ada/s-vaflop.adb b/gcc/ada/s-vaflop.adb
index 221506f2440..ac50817c8d7 100644
--- a/gcc/ada/s-vaflop.adb
+++ b/gcc/ada/s-vaflop.adb
@@ -444,22 +444,22 @@ package body System.Vax_Float_Operations is
end Sub_G;
------------
- -- T_To_G --
+ -- T_To_D --
------------
- function T_To_G (X : T) return G is
+ function T_To_D (X : T) return D is
begin
- return G (X);
- end T_To_G;
+ return G_To_D (T_To_G (X));
+ end T_To_D;
------------
- -- T_To_D --
+ -- T_To_G --
------------
- function T_To_D (X : T) return D is
+ function T_To_G (X : T) return G is
begin
- return G_To_D (T_To_G (X));
- end T_To_D;
+ return G (X);
+ end T_To_G;
-------------
-- Valid_D --
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index e776b58d80d..1ab90ad06c2 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1654,9 +1654,10 @@ package body Sem_Ch5 is
(Original_Bound : Node_Id;
Analyzed_Bound : Node_Id) return Node_Id
is
- Assign : Node_Id;
- Decl : Node_Id;
- Id : Entity_Id;
+ Assign : Node_Id;
+ Decl : Node_Id;
+ Id : Entity_Id;
+
begin
-- If the bound is a constant or an object, no need for a separate
-- declaration. If the bound is the result of previous expansion
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 1e4ed0b8ecb..3679dcc4040 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -9893,7 +9893,7 @@ package body Sem_Ch6 is
end if;
-- Internally generated subprograms, such as type-specific functions,
- -- don't get assertions checks.
+ -- don't get assertion checks.
if Get_TSS_Name (Designator) /= TSS_Null then
return;