From: brucej@hcx9.SSD.HARRIS.COM
Subject: Re: is this a bug of my Ada compiler
Date: 14 Oct 88 17:24:00 GMT [thread overview]
Message-ID: <94700006@hcx9> (raw)
In-Reply-To: 243@cui.UUCP
> 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;
The Verdix compiler typically does not elaborate static scalar constants.
The declaration in question merely inserts the constant `k' into the
compiler's symbol table. However, subsequent uses of the constant `k'
will be constraint checked against type `T'. In this example there are
no uses of `k'.
The new (1.10) version of the validation suite contains several tests
that enforce the requirement that constraint checks be performed on
constant declarations. It's a good bet that this minor bug will be fixed
when Verdix validates VADS to 1.10.
Disclaimer: I do not work for Verdix, but for a computer vendor that
is the proud owner of a VADS source license. And yes, the 1.10 suite is
a real pain....
----------
Bruce Jones, brucej@hcx1.harris.com
Harris Computers, Fort Lauderdale, FL
prev parent reply other threads:[~1988-10-14 17:24 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
1988-10-13 20:02 ` Fred Hosch
1988-10-14 17:24 ` brucej [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox