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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c283845a79ad871d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-01 09:02:34 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <4ccfed40.0111010649.3f98d88@posting.google.com> Subject: Re: ADA Compile Warning Message-ID: <4efE7.8816$xS6.11821@www.newsranger.com> X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Thu, 01 Nov 2001 12:01:52 EST Organization: http://www.newsranger.com Date: Thu, 01 Nov 2001 17:01:52 GMT Xref: archiver1.google.com comp.lang.ada:15550 Date: 2001-11-01T17:01:52+00:00 List-Id: 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.