【发布时间】:2015-02-12 22:25:17
【问题描述】:
我注意到 GCC 的诊断编译指示只支持一些警告。
这行得通:
#pragma GCC diagnostic error "-Wconversion"
这失败了:
#pragma GCC diagnostic error "-Wframe-larger-than=32"
...出现错误:
error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]
#pragma GCC diagnostic error "-Wframe-larger-than"
..当作为命令行参数传递时,这两个参数都适用于 GCC。
有没有 GCC diagnostic pragma 支持警告的文档?
【问题讨论】:
标签: c pragma gcc-warning