From: Stephen Leake on
Ludovic Brenta <ludovic(a)ludovic-brenta.org> writes:

> Simon Wright <simon(a)pushface.org> writes:
>> Tero Koskinen <tero.koskinen(a)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 ...
>
> Stephe, how about applying this patch to Debian's version of AUnit?

I don't see why. Debian supports the current version of GNAT, which
supports the current Debian version (and newer AdaCore versions) of
AUnit.

--
-- Stephe
From: Ludovic Brenta on
Stephen Leake writes:
> Ludovic Brenta <ludovic(a)ludovic-brenta.org> writes:
>
>> Simon Wright <simon(a)pushface.org> writes:
>>> Tero Koskinen <tero.koskinen(a)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 ...
>>
>> Stephe, how about applying this patch to Debian's version of AUnit?
>
> I don't see why. Debian supports the current version of GNAT, which
> supports the current Debian version (and newer AdaCore versions) of
> AUnit.

The current version of GNAT (in Debian) allows compiling Ada 83, Ada 95
and Ada 2005 programs. I think that allowing Ada 95 programs to use
AUnit is better than forbidding this. So the main objection is that
this patch requires changing the aliversion; I would undertand that you
wouldn't want to do that.

--
Ludovic Brenta.
From: Simon Wright on
Ludovic Brenta <ludovic(a)ludovic-brenta.org> writes:

> Stephen Leake writes:
>> Ludovic Brenta <ludovic(a)ludovic-brenta.org> writes:
>>
>>> Simon Wright <simon(a)pushface.org> writes:
>>>> Tero Koskinen <tero.koskinen(a)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 ...
>>>
>>> Stephe, how about applying this patch to Debian's version of AUnit?
>>
>> I don't see why. Debian supports the current version of GNAT, which
>> supports the current Debian version (and newer AdaCore versions) of
>> AUnit.
>
> The current version of GNAT (in Debian) allows compiling Ada 83, Ada 95
> and Ada 2005 programs. I think that allowing Ada 95 programs to use
> AUnit is better than forbidding this. So the main objection is that
> this patch requires changing the aliversion; I would undertand that you
> wouldn't want to do that.

Ludovic,

I think it's very likely that the current Debian GNAT supports AUnit 3's
use of this pragma, even in -gnat95 mode ... OK, just tried in a VM
running (sorry for my ignorance about the Debian release name) Debian 5,
GNAT 4.3.2, and it says ..

simon(a)nidhoggr-d:/mnt/hgfs/simon/AUnit-svn/aunit/containers$ gnatmake -gnat95 ada_containers-aunit_lists.adb -c -u -f -I../framework
gcc-4.3 -c -gnat95 -I../framework ada_containers-aunit_lists.adb
simon(a)nidhoggr-d:/mnt/hgfs/simon/AUnit-svn/aunit/containers$

which looks good to me. So no need for any change.

--S
From: Ludovic Brenta on
Simon Wright writes on comp.lang.ada:
> Ludovic Brenta <ludovic(a)ludovic-brenta.org> writes:
>
>> Stephen Leake writes:
>>> Ludovic Brenta <ludovic(a)ludovic-brenta.org> writes:
>>>
>>>> Simon Wright <simon(a)pushface.org> writes:
>>>>> Tero Koskinen <tero.koskinen(a)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 ...
>>>>
>>>> Stephe, how about applying this patch to Debian's version of AUnit?
>>>
>>> I don't see why. Debian supports the current version of GNAT, which
>>> supports the current Debian version (and newer AdaCore versions) of
>>> AUnit.
>>
>> The current version of GNAT (in Debian) allows compiling Ada 83, Ada 95
>> and Ada 2005 programs. I think that allowing Ada 95 programs to use
>> AUnit is better than forbidding this. So the main objection is that
>> this patch requires changing the aliversion; I would undertand that you
>> wouldn't want to do that.
>
> Ludovic,
>
> I think it's very likely that the current Debian GNAT supports AUnit 3's
> use of this pragma, even in -gnat95 mode ... OK, just tried in a VM
> running (sorry for my ignorance about the Debian release name) Debian 5,
> GNAT 4.3.2, and it says ..
>
> simon(a)nidhoggr-d:/mnt/hgfs/simon/AUnit-svn/aunit/containers$ gnatmake -gnat95 ada_containers-aunit_lists.adb -c -u -f -I../framework
> gcc-4.3 -c -gnat95 -I../framework ada_containers-aunit_lists.adb
> simon(a)nidhoggr-d:/mnt/hgfs/simon/AUnit-svn/aunit/containers$
>
> which looks good to me. So no need for any change.

OK, thanks a lot for checking this.

--
Ludovic Brenta.
From: Stephen Leake on
Ludovic Brenta <ludovic(a)ludovic-brenta.org> writes:

> Stephen Leake writes:
>> Ludovic Brenta <ludovic(a)ludovic-brenta.org> writes:
>>
>>> Simon Wright <simon(a)pushface.org> writes:
>>>> Tero Koskinen <tero.koskinen(a)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 ...
>>>
>>> Stephe, how about applying this patch to Debian's version of AUnit?
>>
>> I don't see why. Debian supports the current version of GNAT, which
>> supports the current Debian version (and newer AdaCore versions) of
>> AUnit.
>
> The current version of GNAT (in Debian) allows compiling Ada 83, Ada 95
> and Ada 2005 programs.

True. I have no idea how many people use the old language. I should
think the only reason to do that is for compatibility with a different
compiler. And even then, the language version is not likely to be an issue.

For example, I used to program in DDC Ada for an embedded computer, but
GNAT for development and unit test. I used GNAT in Ada 95 mode, while
DDC was Ada 83. No problems.

> I think that allowing Ada 95 programs to use AUnit is better than
> forbidding this. So the main objection is that this patch requires
> changing the aliversion;

No, the main objection is that it is different than upstream. I don't
have access to the AUnit test suite. I don't want to fork.

--
-- Stephe