comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: ANN: Simple components for Ada v3.9
Date: Tue, 13 Jul 2010 18:35:38 +0200
Date: 2010-07-13T18:35:38+02:00	[thread overview]
Message-ID: <1qyb3t69th9fx.1xxao6etfmeuf.dlg@40tude.net> (raw)
In-Reply-To: c9cd50ba-be1f-4b40-9075-7f9dfe11580c@r27g2000yqb.googlegroups.com

On Tue, 13 Jul 2010 05:45:11 -0700 (PDT), Ludovic Brenta wrote:

> Dmitry A. Kazakov wrote:
>> On Mon, 12 Jul 2010 22:36:09 +0200, Dirk Heinrichs wrote:
>>> Dmitry A. Kazakov wrote:
>>
>>>> The version 3.9 has experimental packages for Debian and Fedora linux.
>>>> Note that due to gcc 4.4 bugs not all features are available. See release
>>>> notes:
>>
>>>>http://www.dmitry-kazakov.de/distributions/components_debian.htm
>>
>>> For which debian version are those packages? I assume "testing", because of
>>> gcc 4.4.
>>
>> Yes it is the "squeeze".
>>
>>> OTOH you state that "APQ persistence layer is not supported because
>>> APQ is not yet packaged.", but APQ packages are available for "testing". So
>>> I'm a bit confused.
>>
>> It wasn't there last time I looked for it. Do you have the package names
>> (bin and dev)? I will take a look.
> 
> libapq1-dev (database-independent part)
> libapq-postgresql1-dev (PostgreSQL-specific part)

Thanks.

>> P.S. In any case in order to use the persistent layer of Simple Components,
>> the gcc 4.4 must be fixed first. The current version has controlled types
>> broken and some other severe issues.
> 
> Wow, that's a pretty grave problem; if what you say is true, a fix in
> the stable GCC 4.4 branch is justified. What is the bugzilla number
> for this bug?

There are several. For example this one:

with Ada.Finalization;
with Ada.Unchecked_Deallocation;
with Ada.Text_IO;

procedure Controlled_Array is
   type T is new Ada.Finalization.Limited_Controlled with record
      C : Natural := 0;
   end record;
   overriding procedure Finalize (X : in out T);

   procedure Finalize (X : in out T) is
   begin
      if X.C = 0 then
         Ada.Text_IO.Put_Line ("Successful finalization");
      else
         Ada.Text_IO.Put_Line ("Illegal count in finalization" &
Integer'Image (X.C));
         raise Program_Error;
      end if;
   end Finalize;

   type T_Ptr is access T'Class;
   type H is new Ada.Finalization.Controlled with record
      P : T_Ptr;
   end record;
   overriding procedure Finalize (X : in out H);
   overriding procedure Adjust (X : in out H);

   procedure Finalize (X : in out H) is
      procedure Free is new Ada.Unchecked_Deallocation (T'Class, T_Ptr);
   begin
      if X.P /= null then
         X.P.C := X.P.C - 1;
         if X.P.C = 0 then
            Free (X.P);
         end if;
      end if;
   end Finalize;
   procedure Adjust (X : in out H) is
   begin
      X.P.C := X.P.C + 1;
   end Adjust;

   type H_Array is array (Positive range <>) of H;

   function Create return H is
      Result : H;
   begin
      Result.P := new T;
      Result.P.C := 1;
      return Result;
   end Create;

   List  : H_Array := (Create, Create, Create);
   First : T_Ptr := List (List'First).P;
begin
   Ada.Text_IO.Put_Line ("Count" & Integer'Image (First.C));
end Controlled_Array;

Some others can be found in the Simple Components tests.

I am not sure if I posted any of them there. I did report to AdaCore. Most
of them were fixed prior GNAT GPL 2009 was published.

Is a merge with GPL 2009/10 planned? I am asking because I still don't
understand that complex mechanics governing FSF releases. In particular
merits of posting two-three years old bugs all fixed in GNAT GPL, like the
above bug.

I do have a base of bug reports I sent to AdaCore, but unfortunately I
cannot post most of them, because they contain proprietary code. Then, of
course, there are lots of bugs reported by other AdaCore customers. So my
uneducated guess, would rather be: let them do the merge first, and then
we'll see.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2010-07-13 16:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-11 20:52 ANN: Simple components for Ada v3.9 Dmitry A. Kazakov
2010-07-12 20:36 ` Dirk Heinrichs
2010-07-12 22:09   ` tonyg
2010-07-13  8:06     ` Dmitry A. Kazakov
2010-07-13  8:37       ` tonyg
2010-07-13 16:59       ` Warren
2010-07-13  7:55   ` Dmitry A. Kazakov
2010-07-13 12:45     ` Ludovic Brenta
2010-07-13 16:35       ` Dmitry A. Kazakov [this message]
2010-07-13 19:20         ` Simon Wright
2010-07-13 19:55           ` Dmitry A. Kazakov
2010-07-14 14:54             ` Ludovic Brenta
2010-08-03 17:44               ` GNAT bug: array aggregate containing controlled objects (was: ANN: Simple components for Ada v3.9) Ludovic Brenta
2010-08-03 19:28                 ` GNAT bug: array aggregate containing controlled objects Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox