On Thu, Jul 31, 2014 at 6:48 AM, gettimothy gettimothy@zoho.com wrote:
Hi Eliot.
What/where sets the PRODUCTION and NoDbgRegParms variables in the #if !PRODUCTION && defined(__GNUC__) && !defined(NoDbgRegParms) check ?
PRODUCTION is defined in platforms/Cross/vm/sqAssert.h
The !defined(NoDbgRegParms) phrase allows someone to define an alternative on the command line via a -D argument, so it allows the # define NoDbgRegParms __attribute__ ((regparm (0))) def to be a default, rather thna the only way.
Are they set by 'somewhere' by various -D flags in the mvm? I have grepped to no avail.
Here is my thinking at the moment. The compiler error is showing that the NoDbgRegParms is not being replaced.
/home/wm/usr/src/smalltalk/CMake.oscog/cogVMMaker/Contents/Resources/oscogvm/src/vm/cogit.c:1071:13: note: previous declaration of 'ssAllocateRequiredRegMaskupThrough' was here static void ssAllocateRequiredRegMaskupThrough(sqInt requiredRegsMask, sqInt stackPtr) *NoDbgRegParms*; ^ /home/wm/usr/src/smalltalk/CMake.oscog/cogVMMaker/Contents/Resources/oscogvm/src/vm/cogit.c:20947:1: error: conflicting types for 'ssAllocateRequiredReg' ssAllocateRequiredReg(sqInt requiredReg)
So the question becomes "why not".
Well, because the pre-processor (?) is not replacing them. Why? hmmmm....
Both gcc -v & gcc -E can help debug these kinds of things.
thx for your time.
tty