comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Estimating conversion of Ada 83 to Ada 95
Date: 1999/06/08
Date: 1999-06-08T00:00:00+00:00	[thread overview]
Message-ID: <7jk10u$p7$1@nnrp1.deja.com> (raw)
In-Reply-To: 7jjeq8$hs3@hobbes.crc.com

In article <7jjeq8$hs3@hobbes.crc.com>,
  "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> wrote:
> We didn't use the ada83 switch at all, because we found very
> few things that wouldn't compile -- e.g. changes in floating
> point attributes, type constraints on generic parameters, etc.

The Ada 83 is in the business of issuing extra error messages,
not making things compile! There are a couple of exceptions,
but they are minimal.
>
> We did find, however, that it was very useful to use the
> pragma Use_VADS_Size, because there were lots of rep clauses
> of the form X at 0 .. Natural'Size -1;
>
> The fact that Natural'Size changed from 32 to 31 would have
> caused lots of grief the first time around if we hadn't used
> the pragma.

Actually we recommend against using this pragma, since in
practice it can hide problems.

Note that Natural'Size did NOT change from 32 to 31, it changed
from implementation dependent (both 31 and 32 were OK values)
to specified (32 required).

Any code that relied on Natural'Size being 31 was poorly written
non-portable code.

You at least want to consider whether a port of this kind should
clean up stuff like this, and get the code right, rather than
maintain bad non-portable code with a nasty kludge like
Use_VADS_Size.

> I'm curious, though what you plan to do about Pro*Ada, as this
> one doesn't have a "clean" solution to my knowledge.

I am amazed that anyone would think that Use_VADS_Size was
clean. This was put in at the insistence of one customer who
was convinced that they could port without changing any code
at all (quite wrong in fact, but at the time they were adamant
in not changing any code).

When you reengineer code from Ada 83 to Ada 95, it is worth
considering using it as an opportunity to clean up junk code.
It is unlikely that it will get done in the future!



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




  parent reply	other threads:[~1999-06-08  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-08  0:00 Estimating conversion of Ada 83 to Ada 95 Terry J. Westley
1999-06-08  0:00 ` David C. Hoos, Sr.
1999-06-08  0:00   ` Jean-Pierre Rosen
1999-06-08  0:00   ` Robert Dewar [this message]
1999-06-08  0:00 ` James E. Hopper
1999-06-08  0:00 ` Robert Dewar
1999-06-08  0:00 ` Robert Dewar
1999-06-09  0:00   ` Paul Hussein
1999-06-09  0:00 ` Robert I. Eachus
replies disabled

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