是否有相当于 -Wformat gcc 标志的 cc?
我的公司使用大量的 makefile,它使用 CC 来编译,而不是 gcc。我想使用 -Wformat
标志来显示 printf
和 sprintf
中的类型与提供的参数不匹配的错误。
有谁知道 CC 中可以提供此功能的类似标志吗?该任务目前编译得很好,但我知道事实上有 100 个地方存在不匹配的类型,我需要找到它们。
我正在Sun架构上进行编译。
谢谢!
My company uses a massive makefile which uses CC to compile, not gcc. I would like to use the -Wformat
flag to show errors where types in printf
and sprintf
don't match with the provided arguments.
Does anyone know a similar flag in CC which will provide this functionality? The task currently compiles fine, yet I know for a fact there are mismatched types in 100's of places, I need to find them.
I am compiling on Sun architecture.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
完整的 Solaris Studio cc 和 CC 文档可从以下位置获取:
http://www.oracle.com/technetwork/server-storage /solarisstudio/documentation/index.html
您的系统上还安装了手册页 cc(1) 和 CC(1)。
http://download.oracle.com/docs /cd/E18659_01/html/821-2676/cc.1.html
您也可以通过 lint(1) 运行源代码
http://download.oracle.com/docs /cd/E18659_01/html/821-2676/lint.1.html
Complete Solaris Studio cc and CC documentation is available at
http://www.oracle.com/technetwork/server-storage/solarisstudio/documentation/index.html
There are also man pages cc(1) and CC(1) installed on your system.
http://download.oracle.com/docs/cd/E18659_01/html/821-2676/cc.1.html
You might also run the source code thru lint(1)
http://download.oracle.com/docs/cd/E18659_01/html/821-2676/lint.1.html
我对Sun的cc不熟悉,但是如果你说的是100个地方,也许值得花精力去编译它gcc
I'm not familiar with Sun's cc, but if you're talking about 100 places, maybe it worth the effort to compile ith gcc