comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Adding Things to Package System
Date: 1999/02/23
Date: 1999-02-23T00:00:00+00:00	[thread overview]
Message-ID: <36D31FC0.A39BEBAA@averstar.com> (raw)
In-Reply-To: 1999Feb18.192159.18832@nosc.mil

Charles H. Sampson wrote:
> 
>      I've just come across what looks like an interesting bug in both
> the Green Hills and ObjectAda compilers.

This is not a compiler bug.  It is presumably an attempt
to provide backward compatibility with Ada 83 compilers.
The GNAT approach to handling this problem is nice,
but unfortunately it is also non-standard.

From the user perspective, the portable solution to your problem
is to avoid having a "use" clause for package System,
or to qualify any literal with Storage_Offset'(...).

In general, because implementations are allowed to
add arbitrary stuff to package System, you will always
be opening your programs up to non-portability by putting
in a "use System;".

>      I haven't received a reply to my bug report from Green Hills, 

It isn't a bug, just an implementation-dependent aspect
of Ada.

> ... yet this is legal code that the
> compiler can't handle, in violation of 1.1.3(2).

It is not portably "legal" code, unfortunately.  It is
code that is legal if there are no additions to package
System, but as you point out, additions to package System
are permitted.

>      Am I correct in assuming that 1.1.3(2) rules?

No.  Your code is not "universally" legal.  To
minimize non-portabilities, remove any "use" for package System.
Use a rename if you find "System." too painful an addition
at every reference to some declaration in package System.

>                                 Charlie
> --
> ******
> 
>      For an email response, my user name is "sampson" and my host
> is "spawar.navy.mil".

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




  parent reply	other threads:[~1999-02-23  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-18  0:00 Adding Things to Package System Charles H. Sampson
1999-02-18  0:00 ` dewar
1999-02-20  0:00   ` Charles H. Sampson
1999-02-20  0:00     ` Matthew Heaney
1999-02-21  0:00     ` dewar
1999-02-23  0:00 ` Tucker Taft [this message]
1999-02-26  0:00   ` Charles H. Sampson
1999-02-27  0:00     ` Tucker Taft
1999-02-28  0:00       ` dewar
1999-02-28  0:00     ` robert_dewar
replies disabled

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