From: Ronald.Rosenfeld@rc.patrick.af.mil (Ronald Rosenfeld)
Subject: ADA Compile Warning
Date: 1 Nov 2001 06:49:36 -0800
Date: 2001-11-01T14:49:36+00:00 [thread overview]
Message-ID: <4ccfed40.0111010649.3f98d88@posting.google.com> (raw)
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
next reply other threads:[~2001-11-01 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-01 14:49 Ronald Rosenfeld [this message]
2001-11-01 17:01 ` ADA Compile Warning Ted Dennison
2001-11-02 17:42 ` Ronald Rosenfeld
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox