我该如何从C程序中获取汇编代码?我使用了这个建议,并在Eclipse中使用类似于
现在我遇到了这个错误。
这是我的函数。
-c -fmessage-length=0 -O2 -S
的参数,但是我遇到了错误。感谢您提前的帮助。现在我遇到了这个错误。
atam.c:11: error: conflicting types for 'select'
/usr/include/sys/select.h:112: error: previous declaration of 'select' was here
atam.c:11: error: conflicting types for 'select'
/usr/include/sys/select.h:112: error: previous declaration of 'select' was here
这是我的函数。
int select(int board[],int length,int search){
int left=0, right=length-1;
while(1){
int pivot_index=(right+left)/2;
int ordered_pivot=partition(board,left,right,pivot_index);
if(ordered_pivot==search){
return board[ordered_pivot];
}
else if(search<ordered_pivot){
right=ordered_pivot-1;
}
else{
left=ordered_pivot+1;
}
}
}