<div dir="ltr">Hi Timothy,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 20, 2014 at 12:40 PM, gettimothy <span dir="ltr">&lt;<a href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <br><u></u><div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif">
<div>Hi Eliot.<br></div><div><br></div><div>I was able to get the code to compile by modifiying the function declarations in cogit.c and gcc3x-interp.c</div><div><br></div><div>Apologies in advance if my terms are not exact--I am a bit tired and my brain is duller than usual.</div>
<div><br></div><div>Taking the first compile error as representative,</div><div><br><blockquote style="border:1px solid rgb(204,204,204);padding:7px;background-color:rgb(245,245,245)"><div> <br>/home/wm/usr/src/smalltalk/CMake.oscog/cogVMMaker/Contents/Resources/oscogvm/src/vm/cogit.c:1820:1: error: conflicting types for &#39;abstractRegisterForConcreteRegister&#39;<br>
 abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg)<br> ^<br>/home/wm/usr/src/smalltalk/CMake.oscog/cogVMMaker/Contents/Resources/oscogvm/src/vm/cogit.c:384:14: note: previous declaration of &#39;abstractRegisterForConcreteRegister&#39; was here<br>
 static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg) NoDbgRegParms;</div></blockquote><br></div><div> the problem was the &quot;NoDbgRegParms&quot; tacked on to the end of the function declaration at line 384 and not being there on the function implementation at 1820--that error happened for all the declarations.</div>
</div></div></blockquote><div><br></div><div>Read the commit comment for r2922:</div><div><br></div><div><div>Slang:</div><div>In non-production VMs add an attribute to disable register parameters (at least</div><div>for GCC-compliant compilers), allowing all static functions to be called from</div>
<div>gdb even in the -O1 assert VMs.</div></div><div><br></div><div>These defines, which precede the external declaration of e.g. abstractRegisterForConcreteRegister:</div><div><br></div><div>#if !PRODUCTION &amp;&amp; defined(__GNUC__) &amp;&amp; !defined(NoDbgRegParms)</div>
<div># define NoDbgRegParms __attribute__ ((regparm (0)))</div><div>#endif</div><div><br></div><div>#if !defined(NoDbgRegParms)</div><div># define NoDbgRegParms /*empty*/</div><div>#endif</div><div><br></div><div>should result in </div>
<div><br></div><div>static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg) __attribute__ ((regparm (0)));</div><div>...</div><div>static sqInt</div><div>
abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg)</div><div>{</div><div>...</div><div><br></div><div><br></div><div>or</div><div><br class=""><br></div><div>
static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg);</div><div>...</div><div>static sqInt</div><div>abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg)</div>
<div>{</div><div>...</div><div><br></div><div>The first is legal input to gcc.  The second is legal C.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif"><div>you can see them here:<br></div><div><br></div><div><br><blockquote style="border:1px solid rgb(204,204,204);padding:7px;background-color:rgb(245,245,245)">
<div><a href="http://www.squeakvm.org/svn/squeak/branches/Cog/src/vm/cogit.c" target="_blank">http://www.squeakvm.org/svn/squeak/branches/Cog/src/vm/cogit.c</a></div></blockquote> </div><div><br></div><div>I noticed too that my old branch did not have those NoDbgRegParms tacked on while the live Cog trunk does.</div>
<div><br></div><div><br></div><div>So, I edited both cogit.c and gcc3x-cointerp.c and got rid of those NoDbgRegParms and then torched the -DNDEBUG -DDEBUGVM flags and the thing compiled in both cmake and make and ran.<br>
</div><div>(The cmake version does use the -D flags)</div><div><br></div><div><br></div><div>It will be a couple of days before I can devote a study session to your email on the assertion inlining stuff. I just wanted to bring this to your attention  in case some &#39;assertion inlined code&#39; was submitted to svn if such a thing is possible.</div>
<div><br></div><div>Thanks for your pointers on the -w stuff. I have always lived in fear of gcc output, but I am starting to look at it logically; <em> </em>I am beginning to see the outlines of a forest for the trees (:</div>
<div><br></div><div><br></div><div>cordially,</div><div><br></div><div>tty.</div></div></div></blockquote></div><div><br></div>-- <br>Aloha,<div>Eliot</div>
</div></div>