From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,81d15b71303dd93 X-Google-Attributes: gid103376,public From: #1/1 X-Deja-AN: 287789796 Distribution: world Sender: wemagor@sym1.cca.rockwell.com (Wayne Magor) Organization: Rockwell Collins - Avionics Reply-To: No@Junk.Mail Newsgroups: comp.lang.ada Date: 1997-11-08T00:00:00+00:00 List-Id: I am porting some old code that assumes Integer is 16-bits and does lots of unchecked conversions based on this fact. When "Integer" is redefined in the same declarative region that it is used it works fine: type Integer is range -2**15 .. 2**15 - 1; for Integer'Size use 16; subtype bit_range is integer range 0 .. integer'size - 1; type packed_boolean_array is array (Bit_Range) of Boolean; for packed_boolean_array'Size use 16; pragma Pack (packed_boolean_array); however, if I put this declaration of Integer into a separate package and put a "with" and "use" on every package that uses Integer, it doesn't work. I get this type of message: 7 for packed_boolean_array'Size use 16; ...........1 %ADAC-E-SIZE_NOT_EXACT, (1) The number of bits to represent index constraint {type for packed_boolean_array} at line 6 must be exactly 32 [LRM 13.2(6+), 13.4(5+)] This tells me that the compiler is using 32 for the value of Integer'Size. Why is that? Are the declarations in Standard visible before the use clause declarations?