3
在64位Linux機器編譯後,我收到內聯警告。編譯器是:內聯警告
gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1
的警告是:
warning: inlining failed : call is unlikely and code size would grow
warning: called from here
warning: inlining failed: call is unlikely and code size would grow
warning: called from here
warning: inlining failed: call is unlikely and code size would grow
warning: called from here
warning: inlining failed: call is unlikely and code size would grow
我搜索一下與-Winline選項編譯。但還找不到解決方案。我正在尋找擺脫它的方法。如何擺脫它?
slightly edited on 9th May 2010
我已經發布了上面我很久以前面對的問題。我仍然在尋找解決方案。我嘗試從函數中刪除所有內聯。這導致未使用的代碼定義像許多功能:
warning: function defined but not used
我想去除inline_甚至降低了代碼的性能(速度)。請問任何人都可以爲上述問題提出一些建議嗎?
是否有任何優化方法,以便可以不降低性能,並且也可以刪除此警告。
有什麼辦法擺脫它嗎?或者只是我們不得不忽視它,或者有什麼方法抑制這些警告?我不確定抑制警告有多聰明。 – thetna 2010-03-07 00:22:27
建議您從代碼 – 2011-03-29 12:56:56
中刪除內聯嘗試-Wno-inline – 2012-06-26 04:39:05