comp.lang.ada
 help / color / mirror / Atom feed
* is this a bug of my Ada compiler
@ 1988-10-10 20:34 IBRAHIM Bertrand
  1988-10-13 12:50 ` Robert Firth
  1988-10-14 17:24 ` brucej
  0 siblings, 2 replies; 4+ messages in thread
From: IBRAHIM Bertrand @ 1988-10-10 20:34 UTC (permalink / raw)


In the following sample code, I've been very surprised not to be warned by the 
compiler that the initial value for k was out of range:

  procedure bug is

  type T is range 0..255;
  k: constant T := 16#FFE1#;

  begin
    null;
  end bug;

Even at execution time, no exception was raised. I thought that at least at 
elaboration time I would get a numeric_error but it compiled and ran without 
any problem. It is only if I try to compare k to another object of type T that 
I get the numeric_error exception raised.

Is it normal behaviour or is it a bug in my VADS 5.5 compiler (the SUN 
implementation) ?

Thank you for your replies,

Bertrand Ibrahim.


              to BITNET                             to EAN
from
BITNET IBRAHIM@CGEUGE51.BITNET                 bertrand%cui.unige.ch@CERNVAX
ARPA   IBRAHIM%CGEUGE51.BITNET@CUNYVM.CUNY.EDU bertrand%cui.unige.ch@ubc.csnet
UUCP                                           cernvax!cui!bertrand.uucp
UUCP                                           mcvax!cernvax!cui!bertrand.uucp
UUCP                                           cui!bertrand@cernvax.UUCP
EAN                                            bertrand@cui.unige.ch

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1988-10-14 17:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1988-10-10 20:34 is this a bug of my Ada compiler IBRAHIM Bertrand
1988-10-13 12:50 ` Robert Firth
1988-10-13 20:02   ` Fred Hosch
1988-10-14 17:24 ` brucej

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