aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2013-04-23 09:44:10 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2013-04-23 11:44:10 +0200
commit872c2f37682753caf8bc05e17a63962382c83798 (patch)
treec27e72b03d28cc471c63a1db4a160a64e14feac8 /gcc
parent9a7049fd649430ab0d377546585a9907d62b2655 (diff)
downloadgcc-872c2f37682753caf8bc05e17a63962382c83798.zip
gcc-872c2f37682753caf8bc05e17a63962382c83798.tar.gz
gcc-872c2f37682753caf8bc05e17a63962382c83798.tar.bz2
a-envvar.adb, [...]: Minor reformatting.
2013-04-23 Robert Dewar <dewar@adacore.com> * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor reformatting. From-SVN: r198180
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/a-envvar.adb8
-rw-r--r--gcc/ada/a-envvar.ads7
-rw-r--r--gcc/ada/exp_util.adb18
-rw-r--r--gcc/ada/sem_ch12.adb1
5 files changed, 22 insertions, 17 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 5bdc8f8..3380383 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-23 Robert Dewar <dewar@adacore.com>
+
+ * a-envvar.adb, a-envvar.ads, exp_util.adb, sem_ch12.adb: Minor
+ reformatting.
+
2013-04-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Object_Declarations): Undo previous patch.
diff --git a/gcc/ada/a-envvar.adb b/gcc/ada/a-envvar.adb
index 1b1f425..edcbeb8 100644
--- a/gcc/ada/a-envvar.adb
+++ b/gcc/ada/a-envvar.adb
@@ -225,11 +225,7 @@ package body Ada.Environment_Variables is
function Value (Name : String; Default : String) return String is
begin
- if Exists (Name) then
- return Value (Name);
-
- else
- return Default;
- end if;
+ return (if Exists (Name) then Value (Name) else Default);
end Value;
+
end Ada.Environment_Variables;
diff --git a/gcc/ada/a-envvar.ads b/gcc/ada/a-envvar.ads
index dd160fc..406aee3 100644
--- a/gcc/ada/a-envvar.ads
+++ b/gcc/ada/a-envvar.ads
@@ -13,6 +13,9 @@
-- --
------------------------------------------------------------------------------
+-- The implementation of this package is as defined in the Ada 2012 RM, but
+-- it is available in Ada 95 and Ada 2005 modes as well.
+
package Ada.Environment_Variables is
pragma Preelaborate (Environment_Variables);
@@ -38,9 +41,11 @@ package Ada.Environment_Variables is
-- then Set first clears any existing environment variable with the given
-- name, and then defines a single new environment variable with the given
-- name and value. Otherwise Program_Error is propagated.
+ --
-- If implementation-defined circumstances prohibit the definition of an
- -- environment variable with the given name and value, then
+ -- environment variable with the given name and value, then exception
-- Constraint_Error is propagated.
+ --
-- It is implementation defined whether there exist values for which the
-- call Set (Name, Value) has the same effect as Clear (Name).
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 778f159..d5f5f0e 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -2041,19 +2041,18 @@ package body Exp_Util is
Literal_Typ => Exp_Typ)))));
-- If the type of the expression is an internally generated type it
- -- may not be necessary to create a new subtype. However there are
- -- two exceptions : references to the current instances, and aliased
- -- array object declarations, for which the back-end needs to create
- -- a template.
+ -- may not be necessary to create a new subtype. However there are two
+ -- exceptions: references to the current instances, and aliased array
+ -- object declarations for which the backend needs to create a template.
elsif Is_Constrained (Exp_Typ)
and then not Is_Class_Wide_Type (Unc_Type)
and then
(Nkind (N) /= N_Object_Declaration
- or else not Is_Entity_Name (Expression (N))
- or else not Comes_From_Source (Entity (Expression (N)))
- or else not Is_Array_Type (Exp_Typ)
- or else not Aliased_Present (N))
+ or else not Is_Entity_Name (Expression (N))
+ or else not Comes_From_Source (Entity (Expression (N)))
+ or else not Is_Array_Type (Exp_Typ)
+ or else not Aliased_Present (N))
then
if Is_Itype (Exp_Typ) then
@@ -2233,8 +2232,7 @@ package body Exp_Util is
return First_Elmt (Access_Disp_Table (Typ));
else
- ADT :=
- Next_Elmt (Next_Elmt (First_Elmt (Access_Disp_Table (Typ))));
+ ADT := Next_Elmt (Next_Elmt (First_Elmt (Access_Disp_Table (Typ))));
while Present (ADT)
and then Present (Related_Type (Node (ADT)))
and then Related_Type (Node (ADT)) /= Iface
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index db30726..11ea3ea 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -3247,6 +3247,7 @@ package body Sem_Ch12 is
if Get_Aspect_Id (Aspect) /= Aspect_Warnings then
Analyze (Expression (Aspect));
end if;
+
Next (Aspect);
end loop;