aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-coinho.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 17:31:56 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 17:31:56 +0200
commit26e7e1a05d9a120305dcc16b8908cd70439b4dd3 (patch)
tree221b324fc246557794e1977bd63dc7c19d564aa1 /gcc/ada/a-coinho.adb
parent7483c88857464141597b422942b0a66189ef12da (diff)
downloadgcc-26e7e1a05d9a120305dcc16b8908cd70439b4dd3.zip
gcc-26e7e1a05d9a120305dcc16b8908cd70439b4dd3.tar.gz
gcc-26e7e1a05d9a120305dcc16b8908cd70439b4dd3.tar.bz2
[multiple changes]
2011-08-04 Thomas Quinot <quinot@adacore.com> * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve the project path. 2011-08-04 Robert Dewar <dewar@adacore.com> * a-coinho.adb: Minor reformatting. 2011-08-04 Robert Dewar <dewar@adacore.com> * a-coinho.ads: Minor reformatting. 2011-08-04 Vadim Godunko <godunko@adacore.com> * s-atocou.ads, s-atocou.adb: New files. * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads, a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove direct use of GCC's atomic builtins and replace them by use of new atomic counter package. 2011-08-04 Ed Schonberg <schonberg@adacore.com> * exp_strm.adb: better error message for No_Default_Stream_Attributes. 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com> * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic with a call to Get_External_Tag. * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on subprogram usage. Remove the guard against package declarations and bodies since Build_Cleanup_Statements is no longer invoked in that context. (Build_Components): Initialize Tagged_Type_Stmts when the context contains at least one library-level tagged type. (Build_Finalizer): New local variables Has_Tagged_Types and Tagged_Type_Stmts along with associated comments on usage. Update the logic to include tagged type processing. (Create_Finalizer): Insert all library-level tagged type unregistration code before the jump block circuitry. (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements. (Expand_N_Package_Declaration): Remove the call to Build_Cleanup_Statements. (Process_Tagged_Type_Declaration): New routine. Generate a call to unregister the external tag of a tagged type. (Processing_Actions): Reimplemented to handle tagged types. (Process_Declarations): Detect the declaration of a library-level tagged type and carry out the appropriate actions. (Unregister_Tagged_Types): Removed. The machinery has been directly merged with Build_Finalizer. From-SVN: r177401
Diffstat (limited to 'gcc/ada/a-coinho.adb')
-rw-r--r--gcc/ada/a-coinho.adb16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/ada/a-coinho.adb b/gcc/ada/a-coinho.adb
index 539c3b1..b6c38b0 100644
--- a/gcc/ada/a-coinho.adb
+++ b/gcc/ada/a-coinho.adb
@@ -102,7 +102,6 @@ package body Ada.Containers.Indefinite_Holders is
begin
if Source.Element = null then
return (AF.Controlled with null, 0);
-
else
return (AF.Controlled with new Element_Type'(Source.Element.all), 0);
end if;
@@ -116,7 +115,6 @@ package body Ada.Containers.Indefinite_Holders is
begin
if Container.Element = null then
raise Constraint_Error with "container is empty";
-
else
return Container.Element.all;
end if;
@@ -184,11 +182,9 @@ package body Ada.Containers.Indefinite_Holders is
begin
Process (Container.Element.all);
-
exception
when others =>
B := B - 1;
-
raise;
end;
@@ -201,7 +197,8 @@ package body Ada.Containers.Indefinite_Holders is
procedure Read
(Stream : not null access Ada.Streams.Root_Stream_Type'Class;
- Container : out Holder) is
+ Container : out Holder)
+ is
begin
Clear (Container);
@@ -215,7 +212,9 @@ package body Ada.Containers.Indefinite_Holders is
---------------------
procedure Replace_Element
- (Container : in out Holder; New_Item : Element_Type) is
+ (Container : in out Holder;
+ New_Item : Element_Type)
+ is
begin
if Container.Busy /= 0 then
raise Program_Error with "attempt to tamper with elements";
@@ -253,11 +252,9 @@ package body Ada.Containers.Indefinite_Holders is
begin
Process (Container.Element.all);
-
exception
when others =>
B := B - 1;
-
raise;
end;
@@ -270,7 +267,8 @@ package body Ada.Containers.Indefinite_Holders is
procedure Write
(Stream : not null access Ada.Streams.Root_Stream_Type'Class;
- Container : Holder) is
+ Container : Holder)
+ is
begin
Boolean'Output (Stream, Container.Element = null);