当我使用GCC 4.7编译我的程序时,我会得到以下提示:
/usr/include/c++/4.7/backward/binders.h:167:5: note: the ABI of passing structure with complex float member has changed in GCC 4.4 here
有没有什么办法可以摆脱它?我尝试过Google搜索,但我找到的都是打印注释字符串的GCC源代码行。
将选项-Wno-psabi
传递给GCC。
/usr/include/c++/4.8.3/bits/stl_pair.h:276:5: note: the ABI of passing structure with complex float member has changed in GCC 4.4
对于以下代码行:
indices.push_back(make_pair(centreIndex,centre));
其中centreIndex是一个整数,centre是一个复浮点数。
为了消除错误信息,我将代码更改为:
indices.push_back(pair<int,complex<float> >(centreIndex,centre));
我认为这样做更好,因为make_pair只是创建pair的一种包装方式。