comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: ANN: Ahven 1.8
Date: Sat, 05 Jun 2010 13:41:15 +0100
Date: 2010-06-05T13:41:15+01:00	[thread overview]
Message-ID: <m2631x649g.fsf@pushface.org> (raw)
In-Reply-To: 20100604183708.2ff8bfd3.tero.koskinen@iki.fi

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

Tero Koskinen <tero.koskinen@iki.fi> writes:

>  * AUnit is Ada 2005 code only and I think it can be compiled
>    only with GNAT (not 100% sure since I haven't tried it with
>    other Ada 2005 compilers)

The 2005-ness occurs because AUnit uses a private copy of
Ada.Containers.Lists with some 05 constructs removed so that it can be
compiled with "an" Ada 95 compiler.

Unfortunately, what they mean is "with an Ada 95 compiler that
recognises pragma Ada_2005 to mean that some Ada 2005 constructs are
permitted even when compiling in Ada 95 mode".

This doesn't include older GNATs, and certainly won't include compilers
from other vendors.

These patches update the current SVN source of AUnit to work with older
GNATs. Ask me if you need a copy and the news system has mangled them or
I've failed to drive Emacs correctly ...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Allow use of AUnit 3 with Ada 95-only compiler --]
[-- Type: text/x-patch, Size: 1617 bytes --]

Index: aunit/containers/ada_containers-aunit_lists.adb
===================================================================
--- aunit/containers/ada_containers-aunit_lists.adb	(revision 164273)
+++ aunit/containers/ada_containers-aunit_lists.adb	(working copy)
@@ -23,8 +23,6 @@
 -- This unit was originally developed by Matthew J Heaney.                  --
 ------------------------------------------------------------------------------
 
-pragma Ada_2005;
-
 with System;  use type System.Address;
 
 with AUnit.Memory;       use AUnit.Memory;
@@ -726,7 +724,7 @@
 
    procedure Iterate
      (Container : List;
-      Process   : not null access procedure (Position : Cursor))
+      Process   : Processor)
    is
       C : List renames Container'Unrestricted_Access.all;
       B : Natural renames C.Busy;
Index: aunit/containers/ada_containers-aunit_lists.ads
===================================================================
--- aunit/containers/ada_containers-aunit_lists.ads	(revision 164273)
+++ aunit/containers/ada_containers-aunit_lists.ads	(working copy)
@@ -35,8 +35,6 @@
 --  Some Ada2005 constructs have also been removed so that user tests can be
 --  compiled in Ada95.
 
-pragma Ada_2005;
-
 generic
    type Element_Type is private;
 
@@ -181,9 +179,11 @@
 
    function Has_Element (Position : Cursor) return Boolean;
 
+   type Processor is access procedure (Position : Cursor);
+
    procedure Iterate
      (Container : List;
-      Process   : not null access procedure (Position : Cursor));
+      Process   : Processor);
 
 --     procedure Reverse_Iterate
 --       (Container : List;

  reply	other threads:[~2010-06-05 12:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02 16:24 ANN: Ahven 1.8 Tero Koskinen
2010-06-03 12:08 ` Stephen Leake
2010-06-03 19:36   ` Dan
2010-06-03 19:43     ` Dan
2010-06-04  9:17     ` Stephen Leake
2010-06-04 15:37       ` Tero Koskinen
2010-06-05 12:41         ` Simon Wright [this message]
2010-06-05 19:17           ` Ludovic Brenta
2010-06-06 12:31             ` Stephen Leake
2010-06-06 16:20               ` Ludovic Brenta
2010-06-06 16:45                 ` Simon Wright
2010-06-06 17:48                   ` Ludovic Brenta
2010-06-07  8:26                 ` Stephen Leake
2010-06-07 19:21                   ` Simon Wright
2010-06-04 17:12       ` Dan
2010-06-05  4:08         ` Stephen Leake
2010-06-08 15:24 ` Jérôme Haguet
replies disabled

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