c++ - gnu gcc 如何抑制警告 : ‘typedef’ was ignored in this declaration [enabled by default]

标签 c++ gcc warnings gnu

我在 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/

相关文章:

mysql - 将 mysql 表从 server1 上的一个数据库复制到 server2 上的另一个数据库

c++ - SPOJ GSS1 WA - 线段树

c++ - G++ 警告 : narrowing conversion of

python - 在 VS C++ 代码中显示 Python 脚本警告

c++ - GNU 链接器 : errors if pointer in header file is declared NULL and/or extern

c - 从汇编程序获取外部

将 gcc 内联汇编转换为 ml64

c++ - 如何使用 "trusty"图像在本地执行 C++ 程序的 Travis CI?

java - 在多个线程中使用相同的 OpenGL 上下文

c++ - cpp 多重继承意外构造函数调用