<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>Hi all.<br></div><div><br></div><div><br></div><div>In Cog/src/vm/cogit.c in moving the&nbsp;#include "dispdbg.h" above the #include "cointerp.h" and #include "cogit.h" like so:<br></div><div><br></div><div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div>#include &lt;stddef.h&gt;<br>#include "sq.h"<br>#include "sqCogStackAlignment.h"<br>#include "cogmethod.h"<br>#include "dispdbg.h"<br>#if COGMTVM<br>#include "cointerpmt.h"<br>#else<br>#include "cointerp.h"<br>#endif<br>#include "cogit.h"<br>&nbsp;</div></blockquote><br>appears to solve the problem.&nbsp;</div><div><br></div><div>My initial thinking is a so.</div><div><br></div><div>dispdg.h brings in sqAssert.h which defines PRODUCTION as 1 or 0 depending on CFLAGS passed in.</div><div><br></div><div>With dispbdg.h included after cogit.h, PRODUCTION &nbsp;was not defined and the tests in cogit.h</div><div><br></div><div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div>#if !PRODUCTION &amp;&amp; defined(__GNUC__) &amp;&amp; !defined(NoDbgRegParms)<br># define NoDbgRegParms __attribute__ ((regparm (0)))<br>#endif<br><br>#if !defined(NoDbgRegParms)<br># define NoDbgRegParms /*empty*/<br>#endif<br>&nbsp;</div></blockquote><br></div><div>My conjecture is as follows (I am NOT fluent in the semantics of cpp, just a script kiddy who bit the bullet and rtfm this week (: ).</div><div><br></div><div>In the ....../build/vm/Makefile, $(interp)?.o is generated prior to cogit.o.</div><div>gcc3x-cointerp.c includes sqAssert.h via dispdg.h prior to the cogit.h and cointerp.h included.</div><div>This PRODUCTION is set 0 or 1 and NoDbgRegParms is defined one way or the other.</div><div>cpp then pre-processes cogit.h.&nbsp;</div><div>At this point, I lose track of the semantics, but I deduce that NoDbgRegParms IS defined from the gcc3x-cointerp.c parse so NoDbgRegParms is left as is in the cogit.c file.</div><div>This was the bug I was tracking down.</div><div><br></div><div>I leave it to the more experienced to judge the correctness of the forensics.</div><div><br></div><div>cheers.</div><div><br></div><div>tty.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></body></html>