Hey everyone.. I was trying to build the jvm on Linux. I´m using SUSE Linux and GCC 4. I am facing a little problem with macro expansion and some help would be greatly appreciated.
While trying to build the jvm, I get the following error: class.c: In function ‘class_load_resolve_clinit’: class.c:1631: error: invalid lvalue in assignment which is a Macro PUSH_FRAME(thridx, pca->max_locals); When I do a gcc - E and save output to file, I can see the macro being expanded to: (pjvm->thread[thridx].sp) += ((pca->max_locals)); (pjvm->thread[thridx].sp) += (1); pjvm->thread[thridx].stack[pjvm->thread[thridx].sp - 0] = (jint) (((pca->max_locals))); (pjvm->thread[thridx].sp) += (1); (rvoid *) *(&(pjvm->thread[thridx].stack[((pjvm->thread[thridx].sp) - (1 +1))])) = GC_STACK_NEW(thridx, (pca->max_locals)); (pjvm->thread[thridx].sp) += (1); pjvm->thread[thridx].stack[pjvm->thread[thridx].sp - 0] = (jint) ((pjvm->thread[thridx].fp)); pjvm->thread[thridx].fp = (((pjvm->thread[thridx].sp) - ((1 + 1 + 1)))); (pjvm->thread[thridx].sp) += (1); pjvm->thread[thridx].stack[pjvm->thread[thridx].sp - 0] = (jint) ((pjvm->thread[thridx].pc.offset)); (pjvm->thread[thridx].sp) += (1); pjvm->thread[thridx].stack[pjvm->thread[thridx].sp - 0] = (jint) ((pjvm->thread[thridx].pc.excpatridx)); (pjvm->thread[thridx].sp) += (1); pjvm->thread[thridx].stack[pjvm->thread[thridx].sp - 0] = (jint) ((pjvm->thread[thridx].pc.codeatridx)); (pjvm->thread[thridx].sp) += (1); pjvm->thread[thridx].stack[pjvm->thread[thridx].sp - 0] = (jint) ((pjvm->thread[thridx].pc.mthidx)); (pjvm->thread[thridx].sp) += (1); pjvm->thread[thridx].stack[pjvm->thread[thridx].sp - 0] = (jint) ((pjvm->thread[thridx].pc.clsidx));;; I tried putting brackets in various macros but nothing helped. Any help would be greatly appreciated. Best Regards, Sanket Sharma This email may contain confidential or privileged information for the intended recipient(s) and the views expressed in the same are not necessarily the views of Zensar Technologies Ltd. If you are not the intended recipient or have received this e-mail by error, its use is strictly prohibited, please delete the e-mail and notify the sender. Zensar Technologies Ltd. does not accept any liability for virus infected mails. --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]