From: firth@sei.cmu.edu (Robert Firth)
Subject: Re: is this a bug of my Ada compiler
Date: 13 Oct 88 12:50:32 GMT [thread overview]
Message-ID: <7324@aw.sei.cmu.edu> (raw)
In-Reply-To: 243@cui.UUCP
In article <243@cui.UUCP> bertrand@cui.UUCP (IBRAHIM Bertrand) writes:
>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.
Since the constant K is never subsequently used, the compiler
has probably optimised your code and deleted both K and the
initial assignment to it. That is legitimate [RM 11.6 (7)],
but I confess I'd rather have had a compile-time warning.
[The person who thought up that
rule about having to add at least
as much matter as you quote was
a BLOODY MORON
]
next prev parent reply other threads:[~1988-10-13 12:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1988-10-10 20:34 is this a bug of my Ada compiler IBRAHIM Bertrand
1988-10-13 12:50 ` Robert Firth [this message]
1988-10-13 20:02 ` Fred Hosch
1988-10-14 17:24 ` brucej
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox