From: Mats.Weber@matrix.ch (Mats Weber)
Subject: Re: Need help with DEC Ada
Date: Wed, 18 Jan 1995 18:23:09 GMT
Date: 1995-01-18T18:23:09+00:00 [thread overview]
Message-ID: <Mats.Weber-1801951923090001@mlma11.matrix.ch> (raw)
In-Reply-To: 19950117.160119.606@vnet.ibm.com
In article <19950117.160119.606@vnet.ibm.com>, pdennis@vnet.ibm.com (Phil
Dennis) wrote:
> 3 pragma component_alignment(storage_unit);
> 4 type integer_32 is range -(2**31) .. (2**31) -
> 1;
> 5 subtype natural_32 is integer_32 range 0 .. in
> teger_32'last; --(2**31)-1;
the original (2**31)-1 should not cause any problem. Ae you really sure it
generates a warning ?
> 6 subtype bit is boolean;
> 7 type raw_memory_t is array(natural_32) of bit;
> .......1
> Info: (1) CONSTRAINT_ERROR will be raised here [LRM 11
> 1(5)]
While elaborating a type declaration, all sorts of attributes of the type
are calculated, such as its 'Size and 'Length attributes. Here the
compiler can see that the 'Length attribute of raw_memory_t will be 2^31,
which is too big an integer to be represented by any integer variable with
your compiler.
BTW, what were you thinking of doing with that type ? I can only see
erroneous uses of it :-)
next prev parent reply other threads:[~1995-01-18 18:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-01-17 21:01 Need help with DEC Ada Phil Dennis
1995-01-18 18:23 ` Mats Weber [this message]
1995-01-20 5:22 ` Robert Dewar
1995-01-23 16:22 ` Mats Weber
1995-01-19 19:38 ` Robert I. Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox