comp.lang.ada
 help / color / mirror / Atom feed
* ADA Compile Warning
@ 2001-11-01 14:49 Ronald Rosenfeld
  2001-11-01 17:01 ` Ted Dennison
  0 siblings, 1 reply; 3+ messages in thread
From: Ronald Rosenfeld @ 2001-11-01 14:49 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-11-02 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-01 14:49 ADA Compile Warning Ronald Rosenfeld
2001-11-01 17:01 ` Ted Dennison
2001-11-02 17:42   ` Ronald Rosenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox