TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Tucker Taft <[log in to unmask]>
Reply To:
Fri, 16 Feb 2001 09:01:44 -0500
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]
Chief Technology Officer, AverCom Corporation (A Titan Company)
Burlington, MA  USA (AverCom was formerly the Commercial Division of AverStar: