删除GCC ABI更改的注释。

12

当我使用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源代码行。

2个回答

11

将选项-Wno-psabi传递给GCC。


3
我收到了相同的信息:
/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的一种包装方式。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接