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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c283845a79ad871d,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-01 06:49:36 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: Ronald.Rosenfeld@rc.patrick.af.mil (Ronald Rosenfeld) Newsgroups: comp.lang.ada Subject: ADA Compile Warning Date: 1 Nov 2001 06:49:36 -0800 Organization: http://groups.google.com/ Message-ID: <4ccfed40.0111010649.3f98d88@posting.google.com> NNTP-Posting-Host: 198.26.123.36 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1004626176 15904 127.0.0.1 (1 Nov 2001 14:49:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 1 Nov 2001 14:49:36 GMT Xref: archiver1.google.com comp.lang.ada:15534 Date: 2001-11-01T14:49:36+00:00 List-Id: Gentlemen: Perhaps someone can help. We use a Rational VADSself Version 6.2.1. ADA compiler for DEC RISC Ultrix machines. When compiling the following piece of code: "WITH text_io; -- WITHs must precede each new package declaration WITH base; PACKAGE byte_io IS NEW text_io.integer_io (base.byte_type);", we get the following warning: "warning: Appendix F: representation of actual prevents code sharing". Why is the warning pointing to "NEW text_io.integer_io (base.byte_type);"? The module "base" has the following code: -------------------------------------------------------------- "PACKAGE base IS --/ Visible Declarations. --/ Visible Constants. -- Note: Different on FE (PC) -- Left to right bit numbers within a byte. -- used for transportable boolean flag definitions. -- e.g. FOR .. USE .. Flag1 AT 0 B0..B0; B0 : CONSTANT := 7; B1 : CONSTANT := 6; B2 : CONSTANT := 5; B3 : CONSTANT := 4; B4 : CONSTANT := 3; B5 : CONSTANT := 2; B6 : CONSTANT := 1; B7 : CONSTANT := 0; --/ Visible Data Types. -- General Base Types SUBTYPE Boolean_type IS -- basic boolean type with possible values of 0 or 1 BOOLEAN; -- Integer Base Types SUBTYPE Integer32_type IS -- Integer of 32 bits INTEGER; SUBTYPE Integer16_type IS -- Integer of 16 bits SHORT_INTEGER; SUBTYPE Integer8_type IS -- Integer of 8 bits TINY_INTEGER; SUBTYPE AddressInt_type IS INTEGER; -- Integer same size as an address -- Float Base Types SUBTYPE Real64_type IS -- Real number of 64 bits FLOAT; SUBTYPE Real32_type IS -- Real number of 32 bits SHORT_FLOAT; -- Byte Base Types TYPE Byte_type IS NEW -- Byte type of 8 bits, range 0 .. 255 unsigned_types.Unsigned_Integer RANGE 0..255; FOR Byte_type'SIZE USE 8; TYPE Byte_Array_type IS -- Array of bytes, each byte being 8 bits ARRAY( INTEGER RANGE <> ) OF Byte_type; PRAGMA PACK(Byte_Array_type); TYPE Byte_Array_Pointer IS ACCESS Byte_Array_type; SUBTYPE Word_type IS -- type word of 0.. 2**16-1 range unsigned_types.Unsigned_Integer RANGE 0..2**16-1; SUBTYPE Double_Word_Type IS -- type word of 0.. 2**32-1 range unsigned_types.Unsigned_Integer ; -- String Base Types TYPE String_Pointer_type IS -- Pointer to the ADA standard type string ACCESS STRING; SUBTYPE String_Index_type IS POSITIVE; -- String index type. Must be same type as STRING index for each system. -- Address Base Constants NULL_ADDR : CONSTANT system.ADDRESS := system.NO_ADDR; -- Constant Null address assigned to the system's No Address --/ Visible Exceptions. PRIVATE --/ Private Declarations. END base; --PACKAGE " -------------------------------------------------------------- Any help would be appreciated. Ron Rosenfeld