comp.lang.ada
 help / color / mirror / Atom feed
From: Ronald.Rosenfeld@rc.patrick.af.mil (Ronald Rosenfeld)
Subject: Re: ADA Compile Warning
Date: 2 Nov 2001 09:42:18 -0800
Date: 2001-11-02T17:42:18+00:00	[thread overview]
Message-ID: <4ccfed40.0111020942.2e12011c@posting.google.com> (raw)
In-Reply-To: 4efE7.8816$xS6.11821@www.newsranger.com

Ted Dennison<dennison@telepath.com> wrote in message news:<4efE7.8816$xS6.11821@www.newsranger.com>...
> In article <4ccfed40.0111010649.3f98d88@posting.google.com>, Ronald Rosenfeld
> says...
> >    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);"?
> 
> This is essentially saying: "Normally, I would share some code between this
> generic instantiation of Text_IO.Integer_IO and all other such instantiations to
> save space. However, I'm unable to do that in this case because of the way
> base.byte_type is defined. Thus I'm going to have to create a separate copy of
> all the code inside the generic."
> 
> This isn't a really big problem, unless you are making lots of Integer_IO
> instantiations. Most Ada compilers don't even implement this generic sharing at
> all, so the fact that this one can't do it in this case is really of little
> concern.
> 
> However, since you appear to be a newbie (based on your capitilzation of "Ada"),
> I'd like to ask *why* you are using Integer_IO in the first place. If you just
> need a string representation of your integer-derived type,
> "Base.Base_Type'image" would do the job much easier. Integer_IO is really only
> for situations where you want to display the value in a specific format, or in a
> base other than 10.
> 
> ---
> T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
> 
> No trees were killed in the sending of this message. 
> However a large number of electrons were terribly inconvenienced.

Ted,

    Many thanks for your help. You asked me why I am using Integer_IO.
That's a good question. I don't know. I just inherited the software.
It does things in ways I don't understand. I tried your suggestion
with success.

Ron



      reply	other threads:[~2001-11-02 17:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]
replies disabled

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