我在 Fedora 16 上使用 GNU gcc 4.6.2。我正在使用第 3 方 API 编写应用程序,编译后,我收到了很多警告。
warning: ‘typedef’ was ignored in this declaration [enabled by default]
只是想知道我该如何抑制它?我用 -Wall 标志编译我的程序。
在此文档中,http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html ,它提到了类似 -Wunused-local-typedefs 的内容。
我试过 -Wno-unused-local-typedefs,但没有用。
谢谢。
最佳答案
-Wno-unused-local-typedefs
适用于 GCC 4.8。
关于c++ - gnu gcc 如何抑制警告 : ‘typedef’ was ignored in this declaration [enabled by default],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9587509/