[Vm-dev] How to think about cogit.c compile error that is
consistent in both gnu an cmake builds
gettimothy at zoho.com
Sun Jul 20 19:40:32 UTC 2014
I was able to get the code to compile by modifiying the function declarations in cogit.c and gcc3x-interp.c
Apologies in advance if my terms are not exact--I am a bit tired and my brain is duller than usual.
Taking the first compile error as representative,
/home/wm/usr/src/smalltalk/CMake.oscog/cogVMMaker/Contents/Resources/oscogvm/src/vm/cogit.c:1820:1: error: conflicting types for 'abstractRegisterForConcreteRegister'
abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg)
/home/wm/usr/src/smalltalk/CMake.oscog/cogVMMaker/Contents/Resources/oscogvm/src/vm/cogit.c:384:14: note: previous declaration of 'abstractRegisterForConcreteRegister' was here
static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg) NoDbgRegParms;
the problem was the "NoDbgRegParms" 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.
you can see them here:
I noticed too that my old branch did not have those NoDbgRegParms tacked on while the live Cog trunk does.
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.
(The cmake version does use the -D flags)
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 'assertion inlined code' was submitted to svn if such a thing is possible.
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; I am beginning to see the outlines of a forest for the trees (:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev