9

When I compile my program with GCC 4.7 I get the following note:

/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

Is there any way to get rid of it? I tried to google it, but all I find is the GCC source code line that prints the note string.

4

2 に答える 2

9

-Wno-psabiオプションを GCC に渡します。

于 2012-12-17T14:13:20.877 に答える
2

私は同じメッセージを受け取っていました:

/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));

ここで、centerIndex は整数であり、center は複雑な浮動小数点数です。

エラーメッセージを取り除くために、コードを次のように変更しました。

indices.push_back(pair<int,complex<float> >(centreIndex,centre));

make_pair はペアを作成するこのより直接的な方法の単なるラッパーであるため、これはより良い方法だと思います。

于 2014-11-18T20:48:38.493 に答える