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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.200.202 with SMTP id ex10mr4573407qab.8.1369930899436; Thu, 30 May 2013 09:21:39 -0700 (PDT) X-Received: by 10.50.36.99 with SMTP id p3mr3176629igj.4.1369930899347; Thu, 30 May 2013 09:21:39 -0700 (PDT) Path: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder3.xlned.com!news.glorb.com!ch1no2944056qab.0!news-out.google.com!y6ni57333qax.0!nntp.google.com!ch1no2944054qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 30 May 2013 09:21:39 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ NNTP-Posting-Host: 66.126.103.122 References: <32d94173-533a-471e-95a0-abb73a6cdcc2@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <216781c4-2c69-4a7b-9f70-fc1101864000@googlegroups.com> Subject: Re: Gnat 2013 is out! From: Adam Beneschan Injection-Date: Thu, 30 May 2013 16:21:39 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 2556 Xref: number.nntp.dca.giganews.com comp.lang.ada:181768 Date: 2013-05-30T09:21:39-07:00 List-Id: On Thursday, May 30, 2013 3:39:46 AM UTC-7, Simon Wright wrote: > If I read the RM right (I probably don't), then because in this case I > don't read the values assigned (they are dummies, after all) I should be > OK. (ARM 6.2 (12/3)). They may be dummies from the caller's point of view, but I'm concerned abou= t the callee's. The callee doesn't know that it's going to get passed "dum= my" variables. If it reads its own OUT parameters after it sets them, then= there could be aliasing problems. If the callee is a subprogram in a different package, then you really shoul= dn't assume anything about what's in the body of the callee, other than wha= t's in the "contract" (whether the contract is expressed as Ada preconditio= ns or just comments). To me, this means that if the contract doesn't say i= t's OK for the parameters to overlap, then you should assume that the calle= e *could* do something that will go wrong if the parameters overlap. Howev= er, if this is your own subprogram in your own package body calling another= subprogram in the same package body, it's more acceptable (IMHO) to assume= that overlapping is OK. -- Adam