ARM中出现static initialisation of '' using address of '' may cause link failure -ropi警告,如何修改举个简单的例子:void func1(char a){}typedef struct wx{void (*func)(char a);int a;int b;} WX;const WX ly={func1,2,0};编译时会出现A
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 22:44:46
ARM中出现static initialisation of '' using address of '' may cause link failure -ropi警告,如何修改举个简单的例子:void func1(char a){}typedef struct wx{void (*func)(char a);int a;int b;} WX;const WX ly={func1,2,0};编译时会出现A
ARM中出现static initialisation of '' using address of '' may cause link failure -ropi警告,如何修改
举个简单的例子:void func1(char a){}
typedef struct wx{
void (*func)(char a);
int a;
int b;} WX;
const WX ly={func1,2,0};
编译时会出现ARM中出现static initialisation of 'ly' using address of 'func1' may cause link failure -ropi警告,请问如何修改才能消除这种警告.
ARM中出现static initialisation of '' using address of '' may cause link failure -ropi警告,如何修改举个简单的例子:void func1(char a){}typedef struct wx{void (*func)(char a);int a;int b;} WX;const WX ly={func1,2,0};编译时会出现A
void func1(char a){}
typedef struct wx{
void (*func)(char a);
int a;
int b;} WX;
const WX ly={func1,2,0};
int main(){
func1('a');
return 0;
}
编译arm-linux-gcc-4.4.3 -Wall -g -o functest functest.c 未出现警告和错误.