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,ded6ba3fc5b87b66 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-10-26 13:26:55 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!xfer13.netnews.com!netnews.com!isdnet!wanadoo.fr!not-for-mail From: Guillaume Newsgroups: comp.lang.ada Subject: Re: First time Ada has let me down Date: Thu, 26 Oct 2000 22:27:57 +0000 Organization: __^__ Message-ID: <8ta429$mtt$1@wanadoo.fr> References: <8FD7DEBEEsynoptikdamudderfuck@news> <8FD8A9ED5andrewloguecdcgycom@142.77.1.194> <39F7AC37.FF6445D@acm.org> NNTP-Posting-Host: aboulogne-102-1-4-50.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8Bit X-Trace: wanadoo.fr 972592009 23485 193.253.182.50 (26 Oct 2000 20:26:49 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 26 Oct 2000 20:26:49 GMT User-Agent: KNode/0.3.2 Xref: supernews.google.com comp.lang.ada:1584 Date: 2000-10-26T20:26:49+00:00 List-Id: Jeff Carter wrote: > Shifty wrote: > > function Calculate_Ip_Header_Length > > (Byte_At : in System.Address) return Integer is > > It's extremely rare to need to use addresses in all-Ada code except when > dealing with hardware, even in Ada 83. It generally indicates either a > poor design or a lack of understanding of the capabilities of the > language. Agreed ! Aliasing effective parameters is not a good way to employ the "use at" clause, as it may break program execution especially with optimization options turned on. I've experienced this myself, the compiler I use at work produces executables which raise program_error on such code. I've not investingated a lot but with a procedure with a small enough effective parameter, the compiler I use seems to copy this parameter in a CPU register making the "use at" clause totally wrong ! I may seem to repeat here but ... the RM is your friend ... "Address clauses should not be used to achieve overlays of objects or overlays of program units. Nor should a given interrupt be linked to more than one entry. Any program using address clauses to achieve such effects is erroneous." Point your browser to : http://www.adahome.com/LRM/83/RM/rm83html/lrm-13-05.html#13.5 Guillaume