2012-12-17 42 views
4

當我編譯我的GCC 4.7,我得到了以下注釋程序:刪除注GCC ABI變化

/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 

有什麼辦法來擺脫它?我試圖谷歌它,但我找到的是打印筆記字符串的GCC源代碼行。

回答

5

將選項-Wno-psabi傳遞給GCC。

0

我得到相同的消息:

/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是整數並且中心是一個複雜的浮動。

爲了擺脫錯誤消息的我改變了代碼:

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

我覺得這是做一個更好的辦法,因爲make_pair只是爲了創造一個對這種更直接的方式包裝。