免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2923 | 回复: 2
打印 上一主题 下一主题

文盲问个问题,关于-Wno-attributes [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-06-26 16:48 |只看该作者 |倒序浏览
make的时候出现这个
cc1plus: error: unrecognized command line option "-Wno-attributes"

在Makefile中:

...
PROTOSKIP_WARNINGS = -Wno-effc++ -Wno-shadow -Wno-missing-braces -Wno-attributes
...
AM_CXXFLAGS = -pipe  -O3  -pedantic -Wall -Wextra -Wundef -Wshadow   -fvisibility=hidden -Wformat=2  -Wstrict-aliasing -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long -Weffc++ -Wold-style-cast -Wredund        ant-decls -Wno-attributes

gcc版本:
# gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)

这个咋整噢?

论坛徽章:
2
摩羯座
日期:2013-10-10 14:29:04天蝎座
日期:2014-01-03 09:14:49
2 [报告]
发表于 2010-06-26 20:29 |只看该作者
-Wno-attributes
Do not warn if an unexpected __attribute__ is used, such as unrecognized attributes, function attributes applied to variables, etc. This will not stop errors for incorrect use of supported attributes.

去掉这个选项就可以了。

论坛徽章:
2
摩羯座
日期:2013-10-10 14:29:04天蝎座
日期:2014-01-03 09:14:49
3 [报告]
发表于 2010-06-26 21:35 |只看该作者
2005-05-24  DJ Delorie  <dj@redhat.com>

        * common.opt (-Wattributes): New.  Default true.
        * doc/invoke.texi (-Wno-attributes): Document.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP