当我尝试编译我的代码时,我不断收到此错误:
cc -Wall -Werror -g -c -o lwp.o lwp.c
lwp.c: In function ânew_intel_stackâ:
lwp.c:120: error: expected expression before â.â token
lwp.c:122: error: expected expression before â.â token
lwp.c:124: error: expected expression before â.â token
lwp.c:126: error: expected expression before â.â token
lwp.c:130: error: expected expression before â.â token
lwp.c:132: error: expected expression before â.â token
lwp.c:134: error: expected expression before â.â token
lwp.c:136: error: expected expression before â.â token
lwp.c:138: error: expected expression before â.â token
lwp.c:140: error: expected expression before â.â token
lwp.c:142: error: expected expression before â.â token
make: *** [lwp.o] Error 1
它所指的功能在这里:
/* make ourselves a nice intuitive "push()" macro */
#define push(sp,val) (*(..sp)=(unsigned)(val))
unsigned long *new_intel_stack(unsigned long *sp,lwpfun func, void *arg) {
unsigned long *ebp;
push(sp,arg); /* argument */
push(sp,lwp_exit); /* for lwp return purposes */
push(sp,func); /* function's return address */
push(sp,0x1abcdef1); /* bogus "saved" base pointer */
ebp=sp; /* remember sp from this point for later */
push(sp,0x6c6f7453); /* push initial eax, ebx, ecx, edx, esi and edi -- bogus */
push(sp,0x66206e65);
push(sp,0x206d6f72);
push(sp,0x746e6957);
push(sp,0x32207265);
push(sp,0x21363030);
push(sp,ebp); /* push initial edp */
return sp;
}
我真的不知道为什么会收到此错误。有任何想法吗?