* Re: ADA compilers/ difference between 83 and 95
2005-06-03 20:32 ` ADA compilers/ difference between 83 and 95 Chris Albertson
@ 2005-06-04 0:10 ` Keith Thompson
2005-06-04 1:44 ` ADA compilers/ difference between 83 and 95 - The answer Jeff C
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Keith Thompson @ 2005-06-04 0:10 UTC (permalink / raw)
Chris Albertson <chrisalbertson90278@yahoo.com> writes:
> Sorry aout the last message hadno text. Here is is again
>
> I'm curious, will ada83 programs not compile under ada95?
>
> If there is a problem where is it? What part of the language spec
> changed in an incompatable way?
[snip]
The biggest change is the new reserved words that Ada 83 programs
might use as identifiers. (That's actually not a very common problem,
as far as I know).
The best way to find out is to try compiling the code with an Ada 95
compiler and read the error messages.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ADA compilers/ difference between 83 and 95 - The answer
2005-06-03 20:32 ` ADA compilers/ difference between 83 and 95 Chris Albertson
2005-06-04 0:10 ` Keith Thompson
@ 2005-06-04 1:44 ` Jeff C
2005-06-04 8:38 ` Pascal Obry
2005-06-04 5:34 ` ADA compilers/ difference between 83 and 95 Jeffrey Carter
2005-06-06 12:24 ` Marin David Condic
3 siblings, 1 reply; 6+ messages in thread
From: Jeff C @ 2005-06-04 1:44 UTC (permalink / raw)
Chris Albertson wrote:
> Sorry aout the last message hadno text. Here is is again
>
>
> I'm curious, will ada83 programs not compile under ada95?
>
Some programs or packages from Ada 83 will indeed not compile but again
it is generally no more of a problem than switching compiler vendors.
See this link:
http://www.adaic.org/learn/tech/8395comp.html
Summary. Along with my experience
a) A few new reserved words. (Never ran into this one)
b) New form required for indefinitite generic parameters (I hit this once)
c) Packages can not have a body if their spec does not require it (I
hit this once. It was always a bad idea by the way_
d) Character now has 256 items instead of 128 (never hurt by this one)
e) Numeric_Error no longer unique. Now renames of constraint error
(Never hurt by this one)
That is all the site listed. I believe I ran into an additional problem
with an attribute that was renamed/removed on floats ('small?) which is
not listed on that link.
Other issues you will run into (that will happen regardless of the Ada
83 v.s. Ada 95 thing)
1) Use of vendor supplied packagages - Can be a big deal.
2) Use of vendor specific attributes or pragmas - can be a moderate deal
3) Different level of support for rep-specs - can be a big deal
4) Different approach for supporting package Machine_Code insertions
5) Code that relies on buggy behavior of the old compiler
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ADA compilers/ difference between 83 and 95 - The answer
2005-06-04 1:44 ` ADA compilers/ difference between 83 and 95 - The answer Jeff C
@ 2005-06-04 8:38 ` Pascal Obry
0 siblings, 0 replies; 6+ messages in thread
From: Pascal Obry @ 2005-06-04 8:38 UTC (permalink / raw)
Jeff C <jcreem@yahoo.com> writes:
> Summary. Along with my experience
>
> a) A few new reserved words. (Never ran into this one)
Trivial to fix and safe.
> b) New form required for indefinitite generic parameters (I hit this once)
Trivial to fix and safe.
> c) Packages can not have a body if their spec does not require it (I hit
> this once. It was always a bad idea by the way_
Trivial to fix and safe. Just add Pragma Elaborate_Body in the spec.
> d) Character now has 256 items instead of 128 (never hurt by this one)
Easy to fix but requires some code review.
> e) Numeric_Error no longer unique. Now renames of constraint error (Never
> hurt by this one)
Easy to fix but requires some code review.
So as you see going from Ada83 to Ada95 is not that difficult. This was the
design decision when designing Ada95: It must be upward compatible. And in
practice it is.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ADA compilers/ difference between 83 and 95
2005-06-03 20:32 ` ADA compilers/ difference between 83 and 95 Chris Albertson
2005-06-04 0:10 ` Keith Thompson
2005-06-04 1:44 ` ADA compilers/ difference between 83 and 95 - The answer Jeff C
@ 2005-06-04 5:34 ` Jeffrey Carter
2005-06-06 12:24 ` Marin David Condic
3 siblings, 0 replies; 6+ messages in thread
From: Jeffrey Carter @ 2005-06-04 5:34 UTC (permalink / raw)
Chris Albertson wrote:
> If there is a problem where is it? What part of the language spec
> changed in an incompatable way? Yes I do have some old code that
> currently runs on a VAX and I'm like to get it running on a
> Duel Xeon system under Solaris 10. I assumed only minor work
> would be required. I think gnat has a switch to disallow
> the '95 syntax.
I've compiled lots of Ada-83 code with Ada-95 compilers and never had a
serious problem. The important thing is that the code was designed to be
portable in the first place. If you have lots of compiler or platform
dependencies in your code, it becomes harder.
--
Jeff Carter
"Oh Lord, bless this thy hand grenade, that with it thou
mayst blow thine enemies to tiny bits, in thy mercy."
Monty Python and the Holy Grail
24
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ADA compilers/ difference between 83 and 95
2005-06-03 20:32 ` ADA compilers/ difference between 83 and 95 Chris Albertson
` (2 preceding siblings ...)
2005-06-04 5:34 ` ADA compilers/ difference between 83 and 95 Jeffrey Carter
@ 2005-06-06 12:24 ` Marin David Condic
3 siblings, 0 replies; 6+ messages in thread
From: Marin David Condic @ 2005-06-06 12:24 UTC (permalink / raw)
I've ported a LOT of VAX/VMS (DEC) Ada 83 to Gnat Ada95 and never
encountered anything that was a problem between the two language
versions. There may be some obscure corner-case rules that trigger
incompatibilities but in practical use, I just never encountered any. I
did get some warnings about using the package ASCII and maybe that's as
close to an incompatability as I've seen.
Mostly, I had some issues where different compiler writers had different
views of what to implement. A few instances where DEC Ada handled
unconstrained types differently from Gnat Ada and, of course, some
vendor specific implementation details once in a while (like packages
that may or may not be there because they are vendor supplied) but two
observations: I don't recall anything that got past the compiler that
ended up being an issue - so the compiler is your friend here. I don't
recall anything that didn't run just fine when it finally linked. I
*have* had problems when porting between two *different* platforms -
mostly with byte-sex issues, but that has been minimal. (Ada 95 has some
features to help you out making byte-sex issues portable as well, but I
have not delved into them lately)
Porting even a large body of Ada code (if reasonably well written to be
portable - no fair throwing in compiler-specific things in every unit &
expecting zero effort) even across platforms has not been much of an
issue in my experience. I've done a few hundred thousand lines in a
couple of days & had it up and running - but it was *my* code so I was
familiar with it and I have usually had the wisdom to isolate any
compiler specifics. Even a stranger's code being moved across platforms
and to a different language standard ought to be minimal fuss.
MDC
Chris Albertson wrote:
> Sorry aout the last message hadno text. Here is is again
>
>
> I'm curious, will ada83 programs not compile under ada95?
>
--
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm
Send Replies To: m o d c @ a m o g
c n i c . r
"The Christian ideal has not been tried and found wanting. It has
been found difficult; and left untried."
-- G. K. Chesterton
======================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread