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-Thread: 103376,5d4ade2fd8fd67c6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Sat, 23 Jul 2011 12:20:53 +0300 Organization: Tidorum Ltd Message-ID: <98vi3lFinkU1@mid.individual.net> References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net LhkDjLyxP6vNHh//RN3UXANgpNYMYfNp+sbflz8BTylo3VexZP Cancel-Lock: sha1:4fe+B+7Gb7KqslMrnvOQslos4p0= User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:21287 Date: 2011-07-23T12:20:53+03:00 List-Id: Randy Brukardt wrote: > My point being that hidden pointers are extremely common in the > implementation of modern programming languages, and certainly are common in > Ada implementations. The only language I know of that insists on making such > things explicit is C, and I think even it has some cases where the pointers > are implicit (struct parameters). Continuing that parenthesis: struct parameters in C are passed by value unless you explicitly declare the parameters as pointers. I think the only implicit introduction of "pointer" in C is when a function parameter is declared as an array or a function, in which case the formal parameter type is actually a pointer to the declared type. Other rules let you omit the "address of" operator (&) on the actual parameters. This reminds me that an early version of GNAT (perhaps 3.03?) was designed to be "compatible" with C in this respect and to pass all record-type parameters by value. We upgraded to this version of GNAT in the middle of an application development and in consequence had to tell the users to run the relatively small application with a 10 MB stack allocation -- rather a lot in those days. As I recall, the next version of GNAT went back to call-by-reference for record types. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .