TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Fri, 16 Feb 2001 09:01:44 -0500
From: Tucker Taft <[log in to unmask]>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: AverStar (formerly Intermetrics) Burlington, MA USA
MIME-Version: 1.0
Parts/Attachments: text/plain (32 lines)
[log in to unmask] wrote:
>
> I have a bit of a dilemma that I was hoping some of you may be able to shed some
> light on. It is in relation to the program below (I know this isn't really the
> place to discuss technical problems, but I'd appreciate any comment on this
> one).
>
> The program below is a modified snippet of something I have to use. The problem
> I have is that I have access to 4 compilers, namely Apex, Green Hills, GNAT and
> ObjectAda that I have used to compile the code. All of them are quite happy to
> compile the program, but I need to know whether I should be reporting this as a
> bug to the supplier of the code, or the compiler vendors!

The unchecked conversion has produced a record whose Month component
has an "invalid representation" (see RM95 13.9.1(9)).
Evaluating the value of that component is a bounded error,
and Program_Error or Constraint_Error can be raised, or the
execution can continue using this invalid representation.

So the compilers you have are conforming to the standard, but
they happen to be choosing different alternatives among the 3 mentioned
in 13.9.1(9).  So this program has a bounded error, and
should be fixed unless you like the current implementation-dependent
behavior  ;-).


--
-Tucker Taft   [log in to unmask]   http://www.averstar.com/~stt/
Chief Technology Officer, AverCom Corporation (A Titan Company)
Burlington, MA  USA (AverCom was formerly the Commercial Division of AverStar:
http://www.averstar.com/services/ebusiness_applications.html)

ATOM RSS1 RSS2