<br><div class="gmail_quote">On Nov 13, 2007 2:49 PM, Ken Pizzini &lt;<a href="mailto:tz_@explicate.org">tz_@explicate.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tue, Nov 13, 2007 at 09:46:13AM -0500, Arthur David Olson wrote:<br>&gt; My own use of &quot;register&quot; isn&#39;t to provide compilers with hints but<br>&gt; rather to avoid unintended calls by reference;
<br><br></div>Is it possible to make &quot;unintended calls by reference&quot;, without at<br>least a stern warning from the compiler (if not an outright error)<br>in the world of prototyped function calls? &nbsp;Passing a pointer-to-T
<br>is quite different from passing a value of type T, after all.<font color="#888888"><br></font></blockquote></div><br>To pass by reference, you have to apply the &#39;address-of&#39; operator to the variable: &amp;variable.
<br>The register storage class prevents you applying &amp; to a variable.<br><br>But you&#39;re correct: except in the weird world of the void pointer (and pointer to void pointer, etc), with prototypes in force, you can&#39;t pass variable where &amp;variable is correct (or vice versa), so forgetting to apply the &amp; would be an error spotted by the compiler.
<br><br>-- <br>Jonathan Leffler &lt;<a href="mailto:jonathan.leffler@gmail.com">jonathan.leffler@gmail.com</a>&gt; &nbsp;#include &lt;disclaimer.h&gt;<br>Guardian of DBD::Informix - v2007.0914 - <a href="http://dbi.perl.org">http://dbi.perl.org
</a><br>&quot;Blessed are we who can laugh at ourselves, for we shall never cease to be amused.&quot;